Created
August 10, 2012 10:20
-
-
Save vicentereig/3313207 to your computer and use it in GitHub Desktop.
Apache 2 + Proxy Balancer + Thin + Rails Asset Pipeline Development Environment for MacOSX
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
# These modules should be loaded by default: proxy_module, proxy_balancer_module, rewrite_module | |
Listen *:80 | |
# You may want to keep the VirtualHost config under extra/*.conf | |
# Start your thin | |
<VirtualHost *:80> | |
ServerName wwww.yourawesomeapp.dev | |
DocumentRoot /Users/vicente/Workspaces/yourawesomeapp/public | |
RewriteEngine On | |
<Proxy balancer://thinservers> | |
BalancerMember http://127.0.0.1:5000 | |
BalancerMember http://127.0.0.1:5001 | |
BalancerMember http://127.0.0.1:5002 | |
</Proxy> | |
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> | |
<Directory /Users/vicente/Workspaces/yourawesomeapp/public> | |
AllowOverride all | |
Options -MultiViews | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Took me a while to get to this gist again. I'll give it a shot again shortly as I'm not using this setup since then.