Skip to content

Instantly share code, notes, and snippets.

@Tynael
Created November 29, 2023 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tynael/7cd21c444536498e8840f58cae47cd29 to your computer and use it in GitHub Desktop.
Save Tynael/7cd21c444536498e8840f58cae47cd29 to your computer and use it in GitHub Desktop.
Apache's httpd-vhosts.conf file
# 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>
@Tynael
Copy link
Author

Tynael commented Nov 29, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment