This commit is contained in:
张威33321
2026-09-08 17:00:51 +08:00
parent e0f7e4ddbf
commit a9de3eb853
4 changed files with 58 additions and 0 deletions

23
office-site/nginx.conf Normal file
View File

@@ -0,0 +1,23 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# 开启压缩
gzip on;
gzip_min_length 1k;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
# 静态资源缓存
location ~* \.(css|js|svg|png|jpg|jpeg|gif|ico|woff2?)$ {
expires 7d;
add_header Cache-Control "public";
}
# 支持 /guide、/report、/support 无后缀访问
location / {
try_files $uri $uri.html $uri/ /index.html;
}
}