Created
November 27, 2013 13:22
-
-
Save dinks/7675570 to your computer and use it in GitHub Desktop.
Apache+Unicorn
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
| <VirtualHost *:80> | |
| ServerName xxx | |
| ServerAlias xxx | |
| <Proxy balancer://unicornservers> | |
| BalancerMember http://127.0.0.1:5000 | |
| </Proxy> | |
| RewriteEngine On | |
| # Static files are served by Apache rest by Unicorn | |
| RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
| RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L] | |
| # NOTE Uncomment if you want Unicorn to serve static content | |
| # ProxyPass / balancer://unicornservers/ | |
| # ProxyPassReverse / balancer://unicornservers/ | |
| # ProxyPreserveHost on | |
| <Proxy *> | |
| Order deny,allow | |
| Allow from all | |
| </Proxy> | |
| </VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment