Files
WonderQ-Project/WonderQ-Admin-UI-Vue/nginx.conf
2026-08-27 15:48:14 +08:00

47 lines
978 B
Nginx Configuration File

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
index index.html;
charset utf-8;
server_tokens off;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
gzip on;
gzip_min_length 1024;
gzip_types text/css application/javascript application/json image/svg+xml;
location = /healthz {
access_log off;
default_type text/plain;
return 200 "ok\n";
}
location = / {
return 302 /admin/;
}
location = /admin {
return 301 /admin/;
}
location = /admin/index.html {
expires -1;
try_files $uri =404;
}
location /admin/assets/ {
expires 1y;
try_files $uri =404;
}
location /admin/ {
try_files $uri $uri/ /admin/index.html;
}
}