Created
May 28, 2011 12:09
-
-
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
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 { | |
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