Files
NexusAI/nginx.conf
ericwyuan 188c02478b docs(部署方案): 同步 NAS+甲骨文反代决策 + 生成部署骨架
- SRS/SDD/README/PROGRESS 统一将部署目标由"美国服务器"更正为"NAS 本机 + 甲骨文服务器反向代理"(此前已确认但未入库)
- 新增 docker-compose.yml / nginx.conf / .env.example(对应待办任务4)
- 相对 SDD 草稿的安全加固:one-api 端口改绑 127.0.0.1(原为公网端口映射),lobe-chat 不再发布主机端口,仅走容器内网
2026-08-23 08:31:09 +08:00

53 lines
1.4 KiB
Nginx Configuration File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}
}
server {
listen 80;
server_name _;
return 301 https://$host$request_uri;
}
}