adding headers for chaching

This commit is contained in:
Steffen Illium 2024-04-27 18:00:31 +02:00
parent c79161aa84
commit abe657a99d

View File

@ -3,8 +3,6 @@ server {
listen [::]:80; listen [::]:80;
server_name localhost; server_name localhost;
#access_log /var/log/nginx/host.access.log main;
location / { location / {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html index.htm; index index.html index.htm;
@ -15,15 +13,15 @@ server {
root /usr/share/nginx/html; root /usr/share/nginx/html;
} }
# redirect server error pages to the static page /50x.html # Caching headers
# location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
#error_page 500 502 503 504 /50x.html; expires 30d;
#location = /50x.html { add_header Pragma public;
# root /usr/share/nginx/html; add_header Cache-Control "public";
#} }
gzip on; gzip on;
gzip_comp_level 4; gzip_comp_level 4;
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
} }