Skip to content

Instantly share code, notes, and snippets.

@joakim
Created May 28, 2011 12:09
Show Gist options
  • Save joakim/996820 to your computer and use it in GitHub Desktop.
Save joakim/996820 to your computer and use it in GitHub Desktop.
nginx configuration of site where changes to static files aren't reflected through nginx
server {
server_name foo;
listen 80;
error_log /var/log/nginx/foo.error;
access_log /var/log/nginx/foo.access main;
root /srv/www;
location ~* \.(png|jpg|jpeg|gif|ico)$ { # TODO Add CSS and JS to the mix for production
expires max;
}
location = /robots.txt {
allow all;
access_log off;
log_not_found off;
}
location / {
index index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment