Created
February 26, 2012 22:32
-
-
Save simonmorley/1919382 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 xxx | |
DocumentRoot "/var/www/html/xxx/xxx-staging/public" | |
CustomLog /var/log/apache2/xxx-staging common | |
RewriteEngine On | |
<Proxy balancer://unicornservers> | |
BalancerMember http://127.0.0.1:5000 | |
</Proxy> | |
XSendFile On | |
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> | |
</VirtualHost> | |
<VirtualHost *:443> | |
RewriteEngine On | |
SSLEngine on | |
CustomLog /var/log/apache2/xxx-staging common | |
ServerAdmin [email protected] | |
ServerName xxx-staging.xxx.com | |
SSLCertificateFile /etc/ssl/xxx.crt | |
SSLCertificateKeyFile /etc/ssl/server.key | |
SSLCertificateChainFile /etc/ssl/intermediate.pem | |
# SSLProtocol all | |
SSLCipherSuite HIGH:MEDIUM | |
DocumentRoot /var/www/html/xxx/xxx-staging/public | |
<Proxy balancer://unicornservers> | |
BalancerMember http://127.0.0.1:5000 | |
</Proxy> | |
XSendFile On | |
# 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> | |
#<LocationMatch "^/assets/.*$"> | |
# Header unset ETag | |
# FileETag None | |
# ExpiresActive On | |
# ExpiresDefault "access plus 1 year" | |
#</LocationMatch> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment