de94e931af
- 添加 Dockerfile.static、docker-compose.server.yml 和 nginx-internal.conf - 优化 Hero 统计数据为 SSR 渲染,提升首屏性能 - 更新案例数据为政府单位数字化解决方案 - 统计数据改为动态计算,基于案例数据和当前年份 - 修复计数器动画初始状态问题
58 lines
1.3 KiB
Plaintext
58 lines
1.3 KiB
Plaintext
server {
|
|
listen 3000;
|
|
server_name localhost;
|
|
|
|
root /var/www/novalon;
|
|
index index.html;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_min_length 256;
|
|
gzip_types
|
|
text/plain
|
|
text/css
|
|
text/xml
|
|
text/javascript
|
|
application/json
|
|
application/javascript
|
|
application/xml
|
|
application/rss+xml
|
|
image/svg+xml;
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
|
|
location /_next/static/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location /fonts/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
add_header Access-Control-Allow-Origin "*";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location ~* \.(svg|jpg|jpeg|png|gif|webp|avif|ico)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri.html $uri/ /404.html;
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
}
|