Update nginx.conf with new gzip and caching settings
This commit is contained in:
parent
07a19d407e
commit
496702f2ab
@ -10,6 +10,7 @@ http {
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
default_type application/octet-stream;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
@ -23,13 +24,19 @@ http {
|
||||
internal;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|ico|css|js|htm|html)$ {
|
||||
root /usr/share/nginx/html;
|
||||
location ~* \.(jpg|jpeg|png|gif|ico|css|html)$ {
|
||||
expires 30d;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location ~* \.js$ {
|
||||
expires 30d;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public";
|
||||
add_header Content-Type application/javascript;
|
||||
}
|
||||
|
||||
error_page 404 /index.html;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user