I don’t know caddy, i only use nginx for zammad , you use nginx and caddy both? may you should try nginx first…
nginx also can support https ;
also , i set the zammad fqdn in web not in the env ;
my env only have:
NGINX_SERVER_SCHEME=https
What I want to explain here is that my method is not the method recommended in the official documents. I figured it out by myself. There may be certain problems. It is for reference only.
and i use my own nginx profile and passthrough to docker containner.
server {
listen 80;
server_name domain;
# 将HTTP请求重定向到HTTPS
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name domain;
ssl_certificate /etc/nginx/ssl/fullchain.pem; # 修改为你的SSL证书路径
ssl_certificate_key /etc/nginx/ssl/privkey.pem; # 修改为你的SSL证书私钥路径
# 强制使用较强的SSL协议和加密套件
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
# 其他 SSL 配置
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
client_max_body_size 50M;
location / {
proxy_pass http://localhost:8080; # 修改为你的后端服务地址
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;
# WebSocket 相关的头信息
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
# 如果需要添加其他配置,请在此处添加
}