Last active
February 5, 2016 21:23
-
-
Save danguita/5077319 to your computer and use it in GitHub Desktop.
Apache VirtualHost config with Unicorn workers proxy
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> | |
ServerAdmin [email protected] | |
ServerName redmine.yourdomain.com | |
DocumentRoot /home/service/apps/redmine/public | |
RewriteEngine On | |
<Proxy balancer://unicornservers> | |
BalancerMember http://127.0.0.1:5000 | |
</Proxy> | |
# Redirect all non-static requests to thin | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L] | |
ProxyPass / balancer://unicornservers/ | |
ProxyPassReverse / balancer://unicornservers/ | |
ProxyPreserveHost on | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
# Disable log writing for reducing I/O load | |
ErrorLog /dev/null | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blog post: http://blog.davidanguita.name/2013/03/03/setting-up-a-cheap-redmine-server-using-unicorn-and-apache/