Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
[IMP] update nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
devane001 committed Sep 17, 2018
1 parent 21e37c0 commit fb1efcd
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,23 @@ server {
}

# Media: images, icons, video, audio, HTC
# location ~* \.(jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
# expires 1M;
# access_log off;
# add_header Cache-Control "public";
# }
location ~* .*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$ {
expires 7d;
location ~* \.(jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 6h;
access_log off;
add_header Cache-Control "public";
}

# CSS and Javascript
# location ~* \.(css|js)$ {
# expires 1y;
# access_log off;
# add_header Cache-Control "public";
# }
location ~* .*\.(?:js|css)$ {
location ~* \.(css|js)$ {
expires 7d;
access_log off;
add_header Cache-Control "public";
}

# location ~* \.(htm|html)$ {
# add_header Cache-Control no-store;
# add_header Pragma no-cache;
# }
location ~* .*\.(?:htm|html)$ {
add_header Cache-Control "no-store, no-cache";
add_header Pragma "no-cache";
location ~* \.(htm|html)$ {
add_header Cache-Control no-store;
add_header Pragma no-cache;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
Expand Down

0 comments on commit fb1efcd

Please sign in to comment.