server { listen 80; server_name localhost; #charset koi8-r; access_log /var/log/nginx/host.access.log main; error_log /var/log/nginx/error.log error; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; if ($request_filename ~* .*\.(js|css|woff|png|jpg|jpeg)$) { expires 100d; #add_header Cache-Control "max-age = 8640000"; } if ($request_filename ~* .*\.(?:htm|html)$) { add_header Cache-Control "no-store"; } } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } gzip on; gzip_static on; gzip_buffers 32 4k; gzip_comp_level 6; gzip_min_length 200; gzip_types text/css text/xml application/javascript; gzip_vary on; }