Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen ip:80;
- server_name yourserver.com cdn1.yourserver.com;
- root /srv/http/nginx/yourserver.com;
- access_log logs/yourserver.com.access.log;
- ## Static files are served directly
- location ~* \.(?:js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- access_log off;
- log_not_found off;
- ## No need to bleed constant updates. Send the all shebang in one
- ## fell swoop.
- tcp_nodelay off;
- break;
- }
- ## Keep a tab on the 'big' static files
- location ~* ^.+\.(?:m4a|mp[34]|mov|ogg|flv|pdf|ppt[x]*)$ {
- expires 30d;
- ## No need to bleed constant updates. Send the all shebang in one
- ## fell swoop.
- tcp_nodelay off;
- }
- location / {
- index index.html;
- charset utf-8;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement