您可能只需要更改与证书相关的那部分。
哦,等等。
听起来像是最近对 NGINX 配置管理方式的更改,这部分现在位于一个不同的文件中:
# do not redirect all hosts back to the main domain name
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /if \$http_host[^\\}]*\}/m
to: ""
是的。这是新的位置:
我认为将该文件名更改为 /etc/nginx/conf.d/outlets/server/20-https.conf 将解决重定向问题。您还需要更改证书的请求方式,不过如果它能正常工作,我想您可能不需要更改它。