问题描述
我正在尝试部署 Laravel saas 项目。在这个项目中,所有用户都有自己的域 URL,如 abc.ss.example.com,xyz.ss.example.com。
此项目使用 Rancher 在 docker 中部署,对于前端服务器,我使用 caddy 服务器作为容器点和 HTTPS。
现在,问题是我使用子域作为主域,所有用户 URL 都是多级域 URL。因此,我需要使用 caddy 生成多级子域通配符 SSL 证书。
我已经尝试过下面的球童服务器代码。
https://*.ss.example.com/ {
proxy / http://{container}.{stack} {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-Proto {scheme}
header_upstream X-Forwarded-Port 443
header_upstream Sec-Websocket-Key {>Sec-Websocket-Key}
header_upstream Sec-Websocket-Extensions {>Sec-Websocket-Extensions}
header_upstream Sec-Websocket-Version {>Sec-Websocket-Version}
header_upstream Connection {>Connection}
header_upstream Upgrade {>Upgrade}
}
header / {
Strict-Transport-Security "max-age=31536000;"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
x-frame-options "sameorigin"
-Server
-X-Powered-By
}
errors stdout
gzip
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)