您好,
我使用 OpenLiteSpeed,并通过 Docker 配合反向代理 安装 Discourse。
我无法强制将 HTTP 重定向到 HTTPS,我已尝试以下所有方法:
- 在管理后台启用
force https - 配置 app.yml
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /server.+{/
to: |
server {
if ($http_x_forwarded_proto = 'http') {
return 301 https://$host$request_uri;
}
- 配置 .htaccess 进行重定向
您能帮我解决此问题吗?