These files represent the content that has been modified during the tutorial.
To better understand the context, go through the video and/or written tutorial.
These files represent the content that has been modified during the tutorial.
To better understand the context, go through the video and/or written tutorial.
# xampp/apache/conf/extra/httpd-vhosts.conf | |
<VirtualHost *:80> | |
ServerName localvaren.com | |
ServerAlias localvaren.com | |
DocumentRoot "G:/xampp/htdocs/varen/public" | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =www.localvaren.com [OR] | |
RewriteCond %{SERVER_NAME} =localvaren.com | |
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName localvaren.com | |
ServerAlias localvaren.com | |
DocumentRoot "G:/xampp/htdocs/varen/public" | |
SSLEngine on | |
SSLCertificateFile "conf/ssl.crt/server.crt" | |
SSLCertificateKeyFile "conf/ssl.key/server.key" | |
</VirtualHost> |
# xampp/apache/conf/httpd.conf | |
# The following lines must be uncommented. Remove the preceeding "#". | |
LoadModule ssl_module modules/mod_ssl.so | |
Include conf/extra/httpd-ssl.conf |
... | |
bin\openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 1825 -extfile v3.ext | |
... |
authorityKeyIdentifier=keyid,issuer | |
basicConstraints=CA:FALSE | |
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = localhost | |
DNS.2 = *.localvaren.com | |
DNS.3 = localvaren.com | |
DNS.4 = 127.0.0.1 | |
DNS.5 = 127.0.0.2 |
Thank you so much for the detailed guide on setting up an SSL certificate in localhost for XAMPP! Your instructions were clear and easy to follow, and I was able to get everything working perfectly. Your help is greatly appreciated!
Happy you found it useful 💜 @McPherson49 @sajjad-mascot
My SSL certificate is not working. I followed the instructions exactly yet firefox keeps giving the security warning. When i click accept and continue (so that it adds it to the exceptions, it goes to https://localhost instead of my domain.
@JesperKnez Have you tried with a different browser such as Google Chrome?
This not working outside the server
@mohammedshajin As mentioned in the tutorial, the solution is meant to be used only in the context of local development.
Thank you for this information. it really worked