# ═══════════════════════════════════════════════════════════ # 国内域名 · ICP备案落地页 Nginx 配置 (阿里云临时服务器) # ═══════════════════════════════════════════════════════════ # # 编号: ALI-NGX-CN-LANDING # 服务器: ALI-SVR · 8.155.62.235 · 阿里云 # 守护: 铸渊 · ICE-GL-ZY001 # 版权: 国作登字-2026-A-00037559 # # 架构: # guanghulab.com / www.guanghulab.com → 国内用户首页 # 前端: /opt/guanghulab-landing/sites/cn-landing/ (静态HTML) # 用途: ICP备案合规展示 · 域名备案迁移期间临时使用 # # ⚠️ 注意: # - 不使用 default_server,避免干扰阿里云服务器上现有服务 # - 所有文件隔离在 /opt/guanghulab-landing/ 目录下 # - 域名迁移到腾讯云后,此配置将被移除 # # 域名变量由部署工作流注入: # ALI_CN_DOMAIN_PLACEHOLDER → guanghulab.com # ═══════════════════════════════════════════════════════════ server { listen 80; server_name ALI_CN_DOMAIN_PLACEHOLDER www.ALI_CN_DOMAIN_PLACEHOLDER; # ─── 安全头 ─── 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 X-Server-Identity "ALI-SVR-CN-LANDING" always; add_header X-Site-Mode "cn-landing-ali" always; # ─── 静态文件根目录 · 国内落地页 ─── root /opt/guanghulab-landing/sites/cn-landing; index index.html; # ─── 前端静态文件 ─── location / { try_files $uri $uri/ /index.html; } # ─── 健康探针 ─── location = /health { access_log off; return 200 '{"status":"ok","server":"ali-cn","role":"cn-landing","domain":"guanghulab.com"}'; add_header Content-Type application/json; } # ─── 静态资源缓存 ─── location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ { expires 7d; add_header Cache-Control "public, immutable"; } # ─── 错误页面 ─── error_page 404 /index.html; error_page 500 502 503 504 /index.html; # ─── 访问日志 (隔离目录) ─── access_log /opt/guanghulab-landing/logs/nginx-access.log; error_log /opt/guanghulab-landing/logs/nginx-error.log; }