Update static file caching and error page configuration
This commit is contained in:
parent
f6debe5f56
commit
ab1f54d573
@ -23,19 +23,13 @@ http {
|
|||||||
internal;
|
internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(jpg|jpeg|png|gif|ico|css|html)$ {
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js|htm|html)$ {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
expires 30d;
|
expires 30d;
|
||||||
add_header Pragma public;
|
add_header Pragma public;
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public";
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.js$ {
|
error_page 404 /error_page.html;
|
||||||
expires 30d;
|
|
||||||
add_header Pragma public;
|
|
||||||
add_header Cache-Control "public";
|
|
||||||
add_header Content-Type application/javascript;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 404 /404.html;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user