Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen 8080;
- server_name _;
- root /usr/share/nginx/html;
- add_header Last-Modified $date_gmt;
- add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
- if_modified_since off;
- expires off;
- etag off;
- try_files $uri $uri/ @index;
- location @index {
- add_header Last-Modified $date_gmt;
- add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
- if_modified_since off;
- expires off;
- etag off;
- try_files /index.html =404;
- }
- location ~* .*\.(?:css|js)$ {
- try_files $uri =404;
- expires 1y;
- access_log off;
- add_header Cache-Control "public";
- }
- location ~ .+\..+$ {
- try_files $uri =404;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement