Created
July 17, 2010 21:37
-
-
Save wpeterson/479869 to your computer and use it in GitHub Desktop.
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 *:80> | |
ServerName local.plm | |
ServerAlias www.local.plm | |
DocumentRoot /Users/winfield/src/plm-website/public | |
ExpiresDefault "access plus 1 day" | |
ErrorDocument 401 /500.html | |
ErrorDocument 403 /500.html | |
ErrorDocument 404 /404.html | |
ErrorDocument 500 /500.html | |
ErrorDocument 502 /500.html | |
ErrorDocument 503 /500.html | |
AllowEncodedSlashes on | |
<Directory "/Users/winfield/src/plm-website/public"> | |
Options FollowSymLinks | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
<Proxy balancer://app_servers> | |
BalancerMember http://127.0.0.1:8080 | |
</Proxy> | |
RewriteEngine On | |
# Rewrite index to check for static | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f | |
RewriteRule ^(.*)$ $1/index.html [QSA,L] | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d | |
RewriteRule ^(.*)[^/]$ $1/ [QSA,L] | |
RewriteCond %{REQUEST_URI} ^/(server-status|balancer-manager) | |
RewriteRule ^/(.*)$ - [L] | |
# Check to see if maintenance.html exists | |
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ /system/maintenance.html [L] | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteRule ^/(.*)$ balancer://app_servers%{REQUEST_URI} [P,QSA,L] | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment