guanghulab/deploy/nginx/dev-sandbox.conf
Guanghu Domestic Migration d1e47f4565
Some checks are pending
自动更新代码和重启 / update-and-restart (push) Waiting to run
CI检查 + 自动部署 / check (push) Waiting to run
CI检查 + 自动部署 / deploy (push) Blocked by required conditions
重启聊天服务 / restart (push) Waiting to run
chore: import sanitized domestic snapshot for REPO-002
Source snapshot: ca48d3ddf926d79aa138306164169baf764bb829
2026-07-17 15:54:41 +08:00

38 lines
1.1 KiB
Plaintext

# 开发者子域名沙箱 · ZY-AGEOS-TOWER-2026-0326-001-S1
# 铸渊统一管理 · 人类不得手动修改
# 版权:国作登字-2026-A-00037559
#
# 前置条件(冰朔/之之配置):
# 1. DNS: *.guanghulab.com → A → 43.134.16.246 (腾讯云·铸渊主权服务器)
# 2. SSL: certbot certonly --dns 模式获取通配符证书 *.guanghulab.com
# 注: 旧服务器 150.109.76.244 (香港) / 8.155.62.235 (阿里云) 已弃用
# HTTP → HTTPS 重定向
server {
listen 80;
server_name ~^(?<devid>dev-\d{3})\.guanghulab\.com$;
return 301 https://$host$request_uri;
}
# HTTPS 子域名沙箱
server {
listen 443 ssl;
server_name ~^(?<devid>dev-\d{3})\.guanghulab\.com$;
ssl_certificate /etc/letsencrypt/live/guanghulab.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/guanghulab.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
root /var/www/sandbox/$devid;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
add_header X-Sandbox-DevId $devid;
access_log /var/log/nginx/sandbox-$devid-access.log;
error_log /var/log/nginx/sandbox-error.log;
}