2023-10-24 07:43:46 +00:00
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
2023-10-24 07:46:18 +00:00
|
|
|
|
2023-10-24 07:38:55 +00:00
|
|
|
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;
|
2023-10-24 08:13:44 +00:00
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
2023-10-24 07:38:55 +00:00
|
|
|
server {
|
2023-10-24 08:08:50 +00:00
|
|
|
listen 80;
|
2023-10-24 08:07:50 +00:00
|
|
|
|
2023-10-24 07:46:18 +00:00
|
|
|
location / {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
try_files $uri $uri/ =404;
|
|
|
|
}
|
|
|
|
|
2023-10-24 07:50:08 +00:00
|
|
|
location /error_page.html {
|
|
|
|
internal;
|
|
|
|
}
|
2023-10-24 08:07:50 +00:00
|
|
|
|
2023-10-24 08:10:13 +00:00
|
|
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js|htm|html)$ {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
expires 30d;
|
2023-10-24 07:38:55 +00:00
|
|
|
add_header Pragma public;
|
|
|
|
add_header Cache-Control "public";
|
|
|
|
}
|
2023-10-24 08:07:50 +00:00
|
|
|
|
2023-10-24 08:10:13 +00:00
|
|
|
error_page 404 /error_page.html;
|
2023-10-24 07:38:55 +00:00
|
|
|
}
|
2023-10-24 07:46:18 +00:00
|
|
|
}
|