Created
November 29, 2023 17:06
-
-
Save Tynael/7cd21c444536498e8840f58cae47cd29 to your computer and use it in GitHub Desktop.
Apache's httpd-vhosts.conf file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example used in https://neutrondev.com/how-to-set-up-ssl-certificate-localhost-xampp/