Skip to content

@simonmorley /gist:1919382
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<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 webmaster@xxx.com.com
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
Something went wrong with that request. Please try again.