diff --git a/nginx_default.conf b/nginx_default.conf index cda0ed04..466d2782 100644 --- a/nginx_default.conf +++ b/nginx_default.conf @@ -3,8 +3,6 @@ server { listen [::]:80; server_name localhost; - #access_log /var/log/nginx/host.access.log main; - location / { root /usr/share/nginx/html; index index.html index.htm; @@ -15,15 +13,15 @@ server { root /usr/share/nginx/html; } - # redirect server error pages to the static page /50x.html - # - #error_page 500 502 503 504 /50x.html; - #location = /50x.html { - # root /usr/share/nginx/html; - #} + # Caching headers + location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { + expires 30d; + add_header Pragma public; + add_header Cache-Control "public"; + } gzip on; 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; -} \ No newline at end of file +}