41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
# chat.newassetchain.io - NAC公链AI 对话界面
|
||
# 代理到 nac-admin 服务(端口 9560),路由 /ai-agents
|
||
|
||
server {
|
||
listen 80;
|
||
server_name chat.newassetchain.io;
|
||
return 301 https://$host$request_uri;
|
||
}
|
||
|
||
server {
|
||
listen 443 ssl;
|
||
server_name chat.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;
|
||
|
||
# 访问根路径直接重定向到 /ai-agents
|
||
location = / {
|
||
return 301 https://$host/ai-agents;
|
||
}
|
||
|
||
# 所有请求代理到 nac-admin 服务
|
||
location / {
|
||
proxy_pass http://127.0.0.1:9560;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Upgrade $http_upgrade;
|
||
proxy_set_header Connection "upgrade";
|
||
proxy_set_header Host $host;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
proxy_read_timeout 300s;
|
||
proxy_connect_timeout 75s;
|
||
}
|
||
}
|