87d6dcc293
- Remove coze-web service from docker-compose.yml
- Replace nginx second stage in frontend/Dockerfile with alpine dist-only stage
- Add nginx-gateway/ with standalone nginx container deployment
- docker-compose.yml joining both coze-network and kong-net
- Split nginx configs into 6 per-domain files:
- 00-upstreams.conf (shared upstreams)
- 10-default-server.conf (catch-all 444)
- 20-coze.conf (coze studio)
- 30-kong-api.conf (kong ai gateway)
- 40-admin-portal.conf (admin portal)
- 50-grafana.conf (grafana dashboard)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
# ============================================================
|
|
# Kong AI Gateway - 对外 API
|
|
# 域名: api.kejiankejian.com
|
|
# ============================================================
|
|
|
|
# HTTP -> HTTPS
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name api.kejiankejian.com;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
# HTTPS
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name api.kejiankejian.com;
|
|
|
|
client_max_body_size 50m;
|
|
client_body_buffer_size 10m;
|
|
|
|
ssl_certificate /etc/nginx/ssl/_.kejiankejian.com_chain.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/_.kejiankejian.com_key.key;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr;
|
|
|
|
location / {
|
|
proxy_pass http://kong_proxy;
|
|
proxy_http_version 1.1;
|
|
|
|
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_set_header Connection "";
|
|
|
|
# SSE / 流式响应
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
}
|