- 发现 NAS 本机 80/443/3000 已被 Gitea/既有服务占用,调整 docker-compose.yml/nginx.conf 端口:nginx 改 8443(对应容器内 443),one-api 改 127.0.0.1:3001(内网回环,不再冲突 Gitea 的 3000) - 验证 NAS 到 Gemini/NVIDIA/Groq/OpenRouter/Mistral 五渠道直连稳定(待办任务1完成) - 确认并实施 Oracle 侧 frp 隧道反代方案:复用已运行的 frps,在 NAS frpc.toml 追加 nexusai 代理(remotePort 443 -> NAS:8443),未影响既有 gitea/wordpress/fam-core 隧道(待办任务3完成) - NAS 上 docker compose up -d 四容器(mysql/one-api/lobe-chat/nginx)全部启动,https://129.146.203.203/ 端到端验证通过(待办任务5:部署部分完成,渠道配置/Token 待人工在 One-API 后台完成)
50 lines
1.5 KiB
Nginx Configuration File
50 lines
1.5 KiB
Nginx Configuration File
user nginx;
|
||
worker_processes auto;
|
||
|
||
error_log /var/log/nginx/error.log notice;
|
||
pid /var/run/nginx.pid;
|
||
|
||
events {
|
||
worker_connections 1024;
|
||
}
|
||
|
||
http {
|
||
include /etc/nginx/mime.types;
|
||
default_type application/octet-stream;
|
||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||
'$status $body_bytes_sent "$http_referer" '
|
||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||
|
||
access_log /var/log/nginx/access.log main;
|
||
|
||
sendfile on;
|
||
keepalive_timeout 65;
|
||
|
||
# 域名/IP 未确定前,先用 _ 通配 server_name(见 SDD 8.4 待确认事项)
|
||
server {
|
||
listen 443 ssl;
|
||
server_name _;
|
||
|
||
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
||
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
||
|
||
location / {
|
||
proxy_pass http://lobe-chat:3210;
|
||
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;
|
||
|
||
# 关闭缓冲/缓存以支持流式输出(SSE)
|
||
proxy_buffering off;
|
||
proxy_cache off;
|
||
proxy_read_timeout 300s;
|
||
}
|
||
}
|
||
|
||
# 未映射 80 端口(NAS 本机 80 已被其他服务占用,见 docker-compose.yml 注释)
|
||
# 公网仅通过甲骨文 frp 隧道转发 443 → 本机 8443,暂不做 HTTP→HTTPS 跳转
|
||
}
|