chore: CRM-NEW baseline
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# 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 访问即可
|
||||
Reference in New Issue
Block a user