Files
agent/nginx.conf
zch1234qq b71e8502ba
Some checks failed
Docker Build and Deploy / build-and-push (push) Failing after 15s
Docker Build and Deploy / deploy-hk (push) Has been skipped
qwe
2025-10-20 23:41:07 +08:00

27 lines
532 B
Nginx Configuration File

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# 支持Next.js的路由
location / {
try_files $uri $uri/ /index.html;
}
# 静态文件缓存
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 30d;
add_header Cache-Control "public, no-transform";
}
# 错误页面
error_page 404 /404.html;
error_page 500 502 503 504 /500.html;
# 禁用访问隐藏文件
location ~ /\. {
deny all;
}
}