Skip to content

Instantly share code, notes, and snippets.

@JBlond
Last active May 3, 2022 06:40
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 JBlond/3d58a1a2e66ce0e42413d9015377a72c to your computer and use it in GitHub Desktop.
Save JBlond/3d58a1a2e66ce0e42413d9015377a72c to your computer and use it in GitHub Desktop.
Apache example
<VirtualHost _default_:80>
DocumentRoot "C:/default"
<Directory "C:/default">
Options Indexes FollowSymLinks
AllowOverride All
Require local
</Directory>
CustomLog "C:\nul" common
</VirtualHost>
<VirtualHost *:80>
ServerName example.com
DirectoryIndex index.html
CustomLog "C:\nul" common
DocumentRoot "C:/htdocs"
<Directory "C:/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
DirectoryIndex index.html
CustomLog "C:\nul" common
DocumentRoot "C:/htdocs/example"
<Directory "C:/htdocs/example">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile conf/certs/fullchain.pem
SSLCertificateKeyFile conf/certs/privkey.pem
<Files ~"\.(cgi|shtml|phtml|php|htm|html?)$>
SSLOptions +StdEnvVars
</Files>
</VirtualHost>
<VirtualHost *:443>
ServerName example2.com
DirectoryIndex index.html
CustomLog "C:\nul" common
DocumentRoot "C:/htdocs/example2"
<Directory "C:/htdocs/example2">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile conf/certs/fullchain2.pem
SSLCertificateKeyFile conf/certs/privkey2.pem
<Files ~"\.(cgi|shtml|phtml|php|htm|html?)$>
SSLOptions +StdEnvVars
</Files>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment