Created
February 15, 2012 17:42
-
-
Save urieljuliatti/1837591 to your computer and use it in GitHub Desktop.
Nginx Config
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
server { | |
listen 80; | |
server_name stressmeter.urieljuliatti.com; | |
access_log /var/log/nginx/production.stressmeter.access.log; | |
root /home/uriel/stressmeter/current/public; | |
# Passenger | |
passenger_enabled on; | |
rails_env production; | |
#error_page 404 /404.html; | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_comp_level 6; | |
gzip_min_length 500; | |
gzip_proxied expired no-cache no-store private auth; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_disable "MSIE [1-6]\."; | |
gzip_buffers 16 8k; | |
#Configuracao de expiracao para imagens e outros arquivos | |
location ~* \.(ico|css|js|swf|html|htm)(\?[0-9]+)?$ { | |
if (-f $request_filename) { | |
access_log off; | |
expires 5d; | |
break; | |
} | |
} | |
location ~* /(images|system|public) { | |
if (-f $request_filename) { | |
access_log off; | |
expires 5d; | |
break; | |
} | |
} | |
location ~ /\. { deny all; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment