【问题标题】:Certificate Creation Error Digital Ocean Lets Encrypt证书创建错误 Digital Ocean Lets Encrypt
【发布时间】:2016-05-10 09:01:43
【问题描述】:

我想将 Rails 应用程序部署到 Digital Ocean 上的服务器,但在此之前我想添加 SSL。我已经按照教程here 进行操作,但在第 2 步中出现以下错误:

Failed authorization procedure. www.xxx.co.za (http-01):urn:acme:error:connection :: The server could not connect to the client to verify the domain :: DNS problem: NXDOMAIN looking up A for www.xxx.co.za, xxx.co.za (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://xxx.co.za/.well-known/acme-challenge/d1kKPdePX3MLO6kMt1pAdFets-N0RkQ_ffM3Y5aEBO8 [xxx.xx.xxx.xx]: 404

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: xxx.co.za
   Type:   unauthorized
   Detail: Invalid response from http://xxx.co.za/.well-known
   /acme-challenge/d1kKPdePX3MLO6kMt1pAdFets-N0RkQ_ffM3Y5aEBO8
   [xxx.xx.xxx.xx]: 404

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A record(s) for that domain
   contain(s) the right IP address.
 - The following errors were reported by the server:

   Domain: www.xxx.co.za
   Type:   connection
   Detail: DNS problem: NXDOMAIN looking up A for www.xxx.co.za

出于隐私原因,我标出了 IP 和域名。我也运行了一个挖掘请求,但不确定这意味着什么。

; <<>> DiG 9.9.5-3ubuntu0.7-Ubuntu <<>> xxx.co.za
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18315
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;xxx.co.za.         IN  A

;; ANSWER SECTION:
xxx.co.za.      1799    IN  A   xxx.xx.xxx.xx

;; Query time: 194 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue May 10 10:55:38 SAST 2016
;; MSG SIZE  rcvd: 59

有什么建议吗?大约 12 小时前,我只编辑了我的域名主机上的 DNS 设置,这是问题所在,我应该等待更长时间吗? “权限:0”是什么意思?这是问题的一部分吗?我以前只与 Heroku 合作过,他们为你做所有事情,现在我管理服务器,它有点复杂。提前致谢!

【问题讨论】:

    标签: ruby-on-rails nginx digital-ocean lets-encrypt


    【解决方案1】:

    好的,所以我发现应该指向rails app的nginx配置文件

    sudo nano /etc/nginx/sites-available/rails
    

    然后记下您的应用程序的根目录,并在生成证书时使用它。还记得在配置更改后重新启动服务器,并尽可能使用 Digital Ocean 的基于 Web 的控制台。

    希望这对其他人有所帮助。

    【讨论】:

    • 我不明白你的解决方案。你能发布更多细节吗?
    • 我在 Digital Ocean 的 droplets 中使用了 One Click App 设置。这似乎与从头开始设置液滴具有不同的 Nginx 设置。因此,根据我的问题中提供的链接使用教程时需要编辑的配置文件必须是我的答案中提供的配置文件。此外,rails 似乎没有子域,因此在向 Lets Encrypt 请求证书时,不能使用 example.com,只能使用 www.example.com。或者至少,这是我所知道的。 @inye
    猜你喜欢
    • 2019-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-06
    • 1970-01-01
    • 2017-06-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多