Created
September 5, 2012 19:29
-
-
Save anonymous/3643109 to your computer and use it in GitHub Desktop.
apache vhost conf for rails
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> | |
ServerAdmin [email protected] | |
ServerName hostname.com | |
DocumentRoot /var/www/vhosts/ruby/htdocs/public | |
CustomLog /var/www/vhosts/ruby/log/access.log combined | |
ErrorLog /var/www/vhosts/ruby/log/error.log | |
<Directory "/var/www/vhosts/ruby/htdocs/public"> | |
SetOutputFilter DEFLATE | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html | |
SetEnvIfNoCase Request_URI \ \.(?:gif|jpe?g|png|swf|mov|mp4)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary | |
</Directory> | |
ErrorDocument 503 /system/maintenance.html | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !.(css|gif|jpg|png)$ | |
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ - [redirect=503,last] | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment