Files
crm-ai/deploy/nginx.conf.example
T
2026-10-23 10:35:28 +08:00

29 lines
1.0 KiB
Plaintext
Raw Permalink 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.
# LibreDesk 反向代理示例(生产)
# 放到 /etc/nginx/sites-available/crm-libredesk 后 ln -s 启用。
# 注意:LibreDesk 依赖 X-Client-IP 做限流/审计,必须设置。
server {
listen 80;
server_name crm.example.com;
client_max_body_size 30M;
location / {
proxy_pass http://127.0.0.1:9000;
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-Forwarded-Proto $scheme;
# LibreDesk 读取该头识别真实客户端
proxy_set_header X-Client-IP $remote_addr;
proxy_cache_bypass $http_upgrade;
proxy_read_timeout 120s;
}
}
# 生产注意:
# 1. 用 HTTPS(certbot),并把 config/config.toml 的 disable_secure_cookies 改成 false
# 2. 若 behind Cloudflare,X-Client-IP 应改成 $http_cf_connecting_ip 并限制源站只接受 CF 回源
# 3. tools 服务不要暴露公网;LibreDesk 通过 host.docker.internal 访问即可