Created
September 11, 2010 15:41
-
-
Save heldopslippers/575280 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#NameVirtualHost *:80 | |
# no www | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ http://%1$1 [R=301,L] | |
<VirtualHost *:80> | |
ServerName webCMS | |
ServerAlias webCMS | |
DocumentRoot /mnt/apps/webCMS/current/public | |
RewriteEngine On | |
<Proxy balancer://thinservers> | |
BalancerMember http://127.0.0.1:50000 | |
BalancerMember http://127.0.0.1:50001 | |
BalancerMember http://127.0.0.1:50002 | |
</Proxy> | |
# Redirect all non-static requests to thin | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L] | |
ProxyPass / balancer://thinservers/ | |
ProxyPassReverse / balancer://thinservers/ | |
ProxyPreserveHost on | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
# Custom log file locations | |
ErrorLog /mnt/apps/webCMS/shared/log/error.log | |
CustomLog /mnt/apps/webCMS/shared/log/access.log combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment