Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <VirtualHost *:80>
- ServerAdmin admin@server.local
- ServerName server.local
- ServerAlias *.server.local
- DocumentRoot "/virtualhosts"
- <Directory /virtualhosts>
- Options Indexes FollowSymLinks MultiViews
- AllowOverride All
- Order allow,deny
- allow from all
- </Directory>
- RewriteEngine on
- # Apache icons
- RewriteRule ^/icons(.*) /usr/share/apache2/icons$1 [L]
- # Base directory, shouldn't be used by anything really
- RewriteCond %{HTTP_HOST} ^(www\.|)server\.local$
- RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
- RewriteRule ^(www\.|)\.server\.local(.*) /virtualhosts/www/$2 [E=APPLICATION_ENVIRONMENT:development,L]
- # If given one arg, assume development
- RewriteCond %{HTTP_HOST} ^[^.]+\.server\.local$
- RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
- RewriteRule ^([^.]+)\.server\.local(.*) /virtualhosts/$1/www/$2 [E=APPLICATION_ENVIRONMENT:development,E=PROJECT:$1,L]
- # If given two args, use the given runlevel
- RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+\.server\.local$
- RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
- RewriteRule ^(development|production)\.([^.]+)\.server\.local(.*) /virtualhosts/$2/www/$3 [E=APPLICATION_ENVIRONMENT:$1,E=PROJECT=$2,L]
- # Send the rest to an access forbidden page
- RewriteRule . - [F,L]
- ErrorDocument 403 "Access Forbidden"
- ErrorLog /virtualhosts/logs/error.log
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- LogLevel debug
- RewriteEngine On
- CustomLog /virtualhosts/logs/access.log combined
- </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement