Created
February 26, 2016 11:37
-
-
Save merianos/a408b47e5b12be6c0d28 to your computer and use it in GitHub Desktop.
Apache virtual host with Virtual Document Root
This file contains 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
<VirtualHost 192.168.1.101:80> | |
UseCanonicalName Off | |
VirtualDocumentRoot "/media/merianos/Large Internal/Web Development Projects/%3/%2.1/%2+" | |
ServerAlias * | |
DirectoryIndex index.php index.html index.htm | |
LogLevel debug | |
ErrorLog /var/log/apache2/vhosts-error.log | |
CustomLog /var/log/apache2/vhosts-access.log combined | |
<Directory "/media/merianos/Large Internal"> | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
<Directory "/media/merianos/Large Internal/Web Development Projects/*/*/*"> | |
Options Indexes FollowSymLinks Includes ExecCGI | |
AllowOverride All | |
Require all granted | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> | |
<IfModule mod_ssl.c> | |
<VirtualHost 192.168.1.101:443> | |
ServerAdmin info@wp-lion.com | |
SSLEngine On | |
SSLCertificateFile /etc/apache2/ssl/apache.crt | |
SSLCertificateKeyFile /etc/apache2/ssl/apache.key | |
ServerAlias * | |
VirtualDocumentRoot "/media/merianos/Large Internal/Web Development Projects/%3/%2.1/%2+" | |
DirectoryIndex index.php index.html index.htm | |
LogLevel debug | |
ErrorLog /var/log/apache2/vhosts-error.log | |
CustomLog /var/log/apache2/vhosts-access.log combined | |
<FilesMatch "\.(cgi|shtml|phtml|php)$"> | |
SSLOptions +StdEnvVars | |
</FilesMatch> | |
<Directory /usr/lib/cgi-bin> | |
SSLOptions +StdEnvVars | |
</Directory> | |
BrowserMatch "MSIE [2-6]" \ | |
nokeepalive ssl-unclean-shutdown \ | |
downgrade-1.0 force-response-1.0 | |
# MSIE 7 and newer should be able to use keepalive | |
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
<Directory "/media/merianos/Large Internal"> | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
<Directory "/media/merianos/Large Internal/Web Development Projects/*/*/*"> | |
Options Indexes FollowSymLinks Includes ExecCGI | |
AllowOverride All | |
Require all granted | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment