gpt4 book ai didi

laravel - nginx 无法使用 Laravel Forge 颁发 letencrypt ssl 证书

转载 作者:行者123 更新时间:2023-12-04 22:37:07 25 4
gpt4 key购买 nike

我在 Nginx 中使用 Laravel Forge 部署了一个 Laravel 项目。
此应用程序有几个别名。
我正在尝试为每个别名颁发 ssl 证书,但出现以下错误:

ERROR: Challenge is invalid! (returned: invalid) (result: ["type"]  "http-01"
["status"] "invalid"
["error","type"] "urn:ietf:params:acme:error:unauthorized"
["error","detail"] "Invalid response from example.com/.well-known/acme-challenge/xxxxxxxxxxxxxxx [xxx.xx.xxx.xx]: \"\u003c!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"DTD/xhtml1-transitional.dtd\\\"\u003e\\n\u003chtml xmlns=\\\"http://www.w3.org/199\""
["error","status"] 403
["error"] {"type":"urn:ietf:params:acme:error:unauthorized","detail":"Invalid response from example.com/.well-known/acme-challenge/xxxxxxxxxxxxxxx [xxx.xx.xxx.xx]: \"\u003c!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"DTD/xhtml1-transitional.dtd\\\"\u003e\\n\u003chtml xmlns=\\\"http://www.w3.org/199\"","status":403}
["url"] "https://acme-v02.api.letsencrypt.org/acme/chall-v3/xxxxxxx/xxxxxx"
["token"] "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
["validationRecord",0,"url"] "example.com/.well-known/acme-challenge/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
["validationRecord",0,"hostname"] "example.com"
["validationRecord",0,"port"] "80"
["validationRecord",0,"addressesResolved",0] "xxx.xx.xxx.xx"
["validationRecord",0,"addressesResolved"] ["xxx.xx.xxx.xx"]
["validationRecord",0,"addressUsed"] "xxx.xx.xxx.xx"
["validationRecord",0] {"url":"example.com/.well-known/acme-challenge/xxxxxxxxxxxxxxx","hostname":"example.com","port":"80","addressesResolved":
["xxx.xx.xxx.xx"],"addressUsed":"xxx.xx.xxx.xx"}
["validationRecord"] [{"url":"example.com/.well-known/acme-challenge/xxxxxxxxxxxxxxxxxx","hostname":"example.com","port":"80","addressesResolved":["xxx.xx.xxx.xx"],"addressUsed":"xxx.xx.xxx.xx"}])
提前感谢您的帮助。

最佳答案

让我们加密说必须通过http(端口80)发送请求,但不能这样做。
尝试这个:
转到底部的 larave Forge 站点页面,并以这种方式编辑 nginx 配置文件:

listen: 80
listen:[::] 80
保存并再次尝试颁发您的证书。
请记住,在此之后,您必须修改配置以允许 https 通信。
它对我有用。

关于laravel - nginx 无法使用 Laravel Forge 颁发 letencrypt ssl 证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65305394/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com