NAC_Blockchain/xic-ico/nginx-configs/ico.newassetchain.io.conf

50 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# XIC Token ICO 预售网站 - ico.newassetchain.io
# 部署日期: 2026-03-06
# 版本: v2.0 (本地化 CDN 依赖,去除外部依赖)
server {
listen 80;
server_name ico.newassetchain.io;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
http2 on;
server_name ico.newassetchain.io;
# SSL 证书(通配符证书,覆盖 *.newassetchain.io
ssl_certificate /root/ssl/_.newassetchain.io.pem;
ssl_certificate_key /root/ssl/_.newassetchain.io.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
# 网站根目录(独立目录,不影响 presale
root /www/wwwroot/ico.newassetchain.io;
index index.html;
# 静态资源长期缓存
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, immutable";
access_log off;
}
# SPA 路由支持(单页应用)
location / {
try_files $uri $uri/ /index.html;
}
# 安全响应头
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# 访问日志
access_log /www/wwwlogs/ico.newassetchain.io.access.log;
error_log /www/wwwlogs/ico.newassetchain.io.error.log;
}