Skip to content

Instantly share code, notes, and snippets.

@henrich-m
Created June 26, 2014 14:54
Show Gist options
  • Save henrich-m/b547b10dd9343f55d0c9 to your computer and use it in GitHub Desktop.
Save henrich-m/b547b10dd9343f55d0c9 to your computer and use it in GitHub Desktop.
ecommerce.conf
server {
listen 80;
server_name static.ecommercebrasil.com.br static.apktmp.com;
root /var/www/ecommerce;
#charset koi8-r;
access_log /var/log/nginx/log/ecommercebrasil.access.log main;
location / {
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# Basic Locations Files
location = /favicon.ico {
access_log off;
log_not_found off;
expires max;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
# Cache Static Files For As Long As Possible
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires max;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment