pibodi
(Nikita)
1
您好!我已从零开始完成安装。
这有点奇怪,因为当我尝试运行 ./discourse-setup 时,我得到了
您的 Discourse 主机名是什么? [oreillefine.art]:
正在检查您的域名 . . .
警告:看起来无法通过主机名 oreillefine.art 访问计算机的 443 端口。
警告:连接到 http://oreillefine.art(端口 80)也失败。
然后我手动编辑了 app.yml 以添加 smtp 设置和 Let’s Encrypt 邮件,以及用于 https 使用的模板。
然后我尝试了 ./discourse-doctor,一切都正常!我能够看到新网站。但是……我现在很困惑:如果我尝试通过 http(http://oreillefine.art)访问我的网站,我看到的是 nginx 默认页面,而 https 可以正常工作(https://oreillefine.art),并且我可以看到 Discourse……非常感谢您提供的任何帮助!
pfaffman
(Jay Pfaffman)
2
我怀疑你收到那个错误是因为你的机器上有其他 NGINX 阻止 Discourse 访问它。
不过我不明白在这种情况下它怎么能获得证书。
pibodi
(Nikita)
3
我确信我没有其他 nginx,这是一个新的 vps,我以前没有安装过 nginx 或 apache……至于 http 和 https 的不同内容,您有什么建议的解决方案吗?
pibodi
(Nikita)
6
重建过程中我看到了这个:
listen 80;
return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri;
}
server {
在 /etc/nginx/conf.d/discourse.conf 中
I, [2024-05-10T12:24:54.676331 #1] INFO -- : Replacing (?m-ix:listen 80;\s+gzip on;) with listen 443 ssl http2;
SSL_TEMPLATE_SSL_BLOCK
在 /etc/nginx/conf.d/discourse.conf 中
I, [2024-05-10T12:24:54.677081 #1] INFO -- : Replacing (?m-ix:listen 80;\s+listen \[::\]:80;\s+gzip on;) with listen 443 ssl http2;
listen [::]:443 ssl http2;
SSL_TEMPLATE_SSL_BLOCK
在 /etc/nginx/conf.d/discourse.conf 中
I, [2024-05-10T12:24:54.677779 #1] INFO -- : Replacing (?-mix:SSL_TEMPLATE_SSL_BLOCK) with
ssl_protocols TLSv1.2 TLSv1.3;
pfaffman
(Jay Pfaffman)
7
现在重定向看起来符合预期。
我最好的猜测是,DNS延迟和主机名曾经指向一个运行未配置的NGINX服务器的某个其他服务器。
3 个赞
system
(system)
关闭
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.