SSL 证书 - nGinx - 错误 404

标签 ssl nginx

我正在关注 this tutorial为我的服务器生成 SSL 证书,但出现此错误。

Failed authorization procedure. example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example.com/.well-known/acme-challenge/OdiQ9qPI7vwc-KVBOwc6BQulaN1827zzfx2ipqznmNM: " 404 Not Found

nginx

location ^~ /.well-known/ {
                allow all;
                root /var/www/laravel;
        }

nginx-t 不返回任何错误。 如果我创建一个文件夹 test 和一个文件 text.txt 我可以使用 http://example.com/.well-known/访问它测试/文本.txt。我尝试删除文件夹 well-know,设置 chmod 0777 没有任何效果...

问题

我错过了什么?

最佳答案

尝试将配置 block 更改为

location ~ .well-known/ {
         allow all;
         root /var/www/laravel;
}

关于SSL 证书 - nGinx - 错误 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44621683/

相关文章:

c# - 使用 Mono 或 Bouncy CaSTLe c# 实现 TLS

nginx - 如何从 nginx 中的 URL 中删除文件扩展名?

CSS 文件未在 Laravel View 中加载

Ubuntu,nginx,RTMP,Twitch - 离线+身份验证时随机播放本地视频文件?

wordpress - 如何将 Nginx 配置为仅为 Azure 应用服务上的 WordPress 提供 https 服务

Python httplib SSL23_GET_SERVER_HELLO :unknown protocol

SSL 证书 webmin

具有根域和子域的 Web 应用程序的 SSL 证书

Python 请求 SSLError : bad handshake on https://gcm-http. googleapis.com

django - 如何在 virtualbox/vagrant 服务器中访问 django 网站?