生成我们的加密证书并设置公共路径名

时间:2016-08-28 03:04:47

标签: encryption nginx https ssl-certificate lets-encrypt

我跟随the guide to generate the certificates并且效果很好:在公共目录(webroot)内部,它会创建一个名为.well-known的文件夹,其中包含一些内容。

然后它尝试向my.domain.com/.well-known/...发出请求,但结果是404应用程序架构。

在我的应用中,公共目录中的内容可以通过特定路径访问:my.domain.com/!/foo/public/.well-known/...

如何判断我们的加密是否向该网址发出请求?

目前它以此错误结束:

Requesting root privileges to run certbot...
  /home/ubuntu/.local/share/letsencrypt/bin/letsencrypt certonly
    --webroot -w ../preview-app-packed/preview-app/public/ -d preview.mydomain.org
Failed authorization procedure.
preview.mydomain.org (http-01): urn:acme:error:unauthorized :: Theclient lacks
sufficient authorization :: Invalid response from http://preview.
mydomain.org/.well-known/acme-challenge/4FH...fsM: "<!DOCTYPE html>

1 个答案:

答案 0 :(得分:1)

TL; DR你不能

您控制/.well-known的事实用于证明您对域名的所有权。这就是为什么你无法改变它的原因。

如果您无法更改应用程序架构,则可以使用其他类型的验证,例如与其他ACME客户端的DNS验证。