我修改了一些设置,以便在同一台 Discourse 服务器上承载其他工作。
某些浏览器在访问网站时会显示 SSL 通知(白屏):
文件: /var/discourse/containers/app.yml
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## 如果您想添加 Let's Encrypt (https),请取消注释以下两行
# - "templates/web.ssl.template.yml"
# - "templates/web.letsencrypt.ssl.template.yml"
- "templates/web.socketed.template.yml"
自动 SSL 生成功能不会像上述那样在更改时运行,因此我手动执行如下操作:
cd /var/discourse
./launcher enter app
"/shared/letsencrypt"/acme.sh --cron --home "/shared/letsencrypt" --force
exit
然后执行 systemctl restart nginx
这是我的 nginx 配置:
server {
listen 443 ssl http2;
ssl on;
ssl_certificate /var/discourse/shared/standalone/letsencrypt/thuvienmuasam.com/thuvienmuasam.com.cer;
ssl_certificate_key /var/discourse/shared/standalone/letsencrypt/thuvienmuasam.com/thuvienmuasam.com.key;
上次没问题,但这次出现了上述错误。
请告诉我,我这样做对吗?

