public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
<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>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.