请问一下泛域名是无法安装论坛的吗

因为我想先用泛域名安装然后备份之后在改成我之前的域名
但是我发现现在提示这个

Hostname for your Discourse? [discourse.example.com]: ceshi.justnainai.com

Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname:  ceshi.justnainai.com.
WARNING: Connection to http://ceshi.justnainai.com (port 80) also fails.

This suggests that ceshi.justnainai.com resolves to some IP address that does not reach this 
machine where you are installing discourse.

The first thing to do is confirm that ceshi.justnainai.com resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.

If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.

This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type

./launcher rebuild app

为什么不能,当然能,这只是提醒你没开https……

啊不对,这是在提醒你你输的域名并不能连到你的主机。

但是众所周知,warning可以无视 你只需要之后把域名A记录改到你主机就行了。

1 Like

泛域名是可以安装的。

Discourse 官方的网站也是装在二级域名上。

但是在安装之前 Discourse 会确定域名能不能访问,原因是 Discourse 默认所有安装的实例都会为你配置 https。

如果你不手动设置,Discourse 就会用 Let’s Encrypt 为你配置 https,使用 Let’s Encrypt 配置 http 的第一个前提就是网站的域名是可以访问的Discourse 重复安装过程中的密钥签发问题

但是 Let’s Encrypt 的域名签发有次数限制,如果多次请求后,同一个域名会要你等几天才能请求。

那么手动设置要怎么设置呢
现在是我ping泛域名是我的ip地址

泛域名应该是没证书现在

能 Ping 通就可以进行安装了。

在安装的时候,如果你的机器没有 https,Discourse 会用 Let’s Encrypt 帮你安装上 https。

如果不行,那么有可能是你 DNS 设置的时间太短,Let’s Encrypt 的服务器通过你的域名访问的时候还没有获得更新的 DNS 结果,那么 Let’s Encrypt 会认为你的域名没有绑定服务,就不会给你签发 https。

这个时候只能是等等再试。

FAILED
--------------------
Pups::ExecError: if [ -z "$LETSENCRYPT_ACCOUNT_EMAIL" ]; then echo "LETSENCRYPT_ACCOUNT_EMAIL ENV variable is required and has not been set."; exit 1; fi failed with return #<Process::Status: pid 1810 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cmd"=>["if [ -z \"$LETSENCRYPT_ACCOUNT_EMAIL\" ]; then echo \"LETSENCRYPT_ACCOUNT_EMAIL ENV variable is required and has not been set.\"; exit 1; fi", "/bin/bash -c \"if [[ ! \\\"$LETSENCRYPT_ACCOUNT_EMAIL\\\" =~ ([^@]+)@([^\\.]+) ]]; then echo \\\"LETSENCRYPT_ACCOUNT_EMAIL is not a valid email address\\\"; exit 1; fi\""]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
467156969f259770a2d1644a3e0bbd87dc8548a1fc6758dc26fc8cbab9530d4f

回家之后重装系统在试试安装看看

上面的日志说说得很明确了喔。

当你的安装的时候,LETSENCRYPT_ACCOUNT_EMAIL 这个参数没有设置。

LETSENCRYPT_ACCOUNT_EMAIL ENV variable is required and has not been set.

这个配置在 模板文件中:

- "templates/web.letsencrypt.ssl.template.yml"

请参考下官方的文档:Set up HTTPS support with Let's Encrypt - Self-Hosting - Discourse Meta

目前按照日志中出现的问题来看,就是 https 签名的问题。

按照上面的错误提示,对照按照实例调整下再试试吧。