Skip to content

Instantly share code, notes, and snippets.

@eyemagine2
Created August 28, 2014 16:52
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 eyemagine2/c2007ee5617cbc744f22 to your computer and use it in GitHub Desktop.
Save eyemagine2/c2007ee5617cbc744f22 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
<Directory /home/*/public_html>
#Options +FollowSymLinks +Indexes All
Options +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /home/qa/*>
#Options +FollowSymLinks +Indexes All
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /home/www/*>
#Options +FollowSymLinks +Indexes All
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#Options +FollowSymLinks All
Options +ExecCGI +FollowSymLinks -Indexes -MultiViews
DirectoryIndex index.php index.html index.htm
UseCanonicalName off
AddType application/x-httpd-php .php
ServerName modena.eyemaginetech.com
#ServerAlias *.modena.eyemaginetech.com
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog "/var/log/httpd/rewrite.log"
RewriteLogLevel 0
# Global robots.txt exclusion, since it is globally aliased, in the /etc/httpd/conf/httpd.conf file.
RewriteCond %{HTTP_HOST} !\.fonts\.
RewriteRule robots.txt /var/www/html/robots.txt [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-l
#RewriteRule ^favicon\.ico /var/www/html/favicon.ico [L]
##############################
##############################
# Stage sites :: www.[document root].modena.eyemaginetech.com => /home/www/[document root]
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.modena\.eyemaginetech\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.modena\.eyemaginetech\.com(.*) /home/www/$1/$2 [L]
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.[^.]+\.modena\.eyemaginetech\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.([^.]+)\.modena\.eyemaginetech\.com(.*) /home/www/$1/$2$3 [L]
# Development sites :: [username].[document root].modena.eyemaginetech.com => /home/[username]/public_html/[document root]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+\.modena\.eyemaginetech\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.([^.]+)\.modena\.eyemaginetech\.com(.*) /home/$1/public_html/$2$3 [L]
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+\.[^.]+\.modena\.eyemaginetech\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.([^.]+)\.([^.]+)\.modena\.eyemaginetech\.com(.*) /home/$1/public_html/$2/$3$4 [L]
</IfModule>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment