kios-webapp/astro/nginx.conf

42 lines
1010 B
Nginx Configuration File
Raw Normal View History

2023-10-24 07:43:46 +00:00
events {
worker_connections 1024;
}
http {
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
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 {
2023-10-24 07:53:24 +00:00
listen 80;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ =404;
}
2023-10-24 07:50:08 +00:00
location /error_page.html {
internal;
}
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;
}
2023-10-24 07:50:08 +00:00
2023-10-24 07:55:04 +00:00
error_page 404 /index.html;
}
}