簡體   English   中英

nodejs greenlock-express不會創建證書

[英]nodejs greenlock-express wont create certificate

我正在嘗試簡單的greenlock-express 示例,我已經嘗試了很多次,但它不起作用。 我多次遵循教程。 我創建了greenlock.d/config.json文件,它可以工作,因為我在 output 上看到了域。

當我啟動時,我看到:

webhook_test | Listening on 0.0.0.0:80 for ACME challenges, and redirecting to HTTPS
webhook_test | Listening on 0.0.0.0:443 for secure traffic
webhook_test | Ready to Serve:
webhook_test |   ewkhrwk.xyz

但是,當我使用 postman 訪問它時,我得到了

webhook_test | ACME Directory URL: https://acme-v02.api.letsencrypt.org/directory
webhook_test | 
webhook_test | By using this software you (me@email.com) are agreeing to the following:
webhook_test | ACME Subscriber Agreement: https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
webhook_test | Greenlock/ACME.js Terms of Use: https://rootprojects.org/legal/#terms
webhook_test | 

它會保持這種狀態幾分鍾。 以前當我幾個月前使用 greenlock 時,它只會在第一次訪問時生成證書。

幾分鍾后,我得到

webhook_test | Error cert_issue:
webhook_test | connect ETIMEDOUT 165.232.74.82:80
webhook_test | code: ETIMEDOUT
webhook_test | Error: connect ETIMEDOUT 165.232.74.82:80
webhook_test |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
webhook_test | Error cert_issue:
webhook_test | connect ETIMEDOUT 165.232.74.82:80
webhook_test | code: ETIMEDOUT
webhook_test | Error: connect ETIMEDOUT 165.232.74.82:80
webhook_test |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
webhook_test | Error cert_issue:
webhook_test | connect ETIMEDOUT 165.232.74.82:80
webhook_test | code: ETIMEDOUT
webhook_test | Error: connect ETIMEDOUT 165.232.74.82:80
webhook_test |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
webhook_test | set greenlockOptions.notify to override the default logger

請問這個問題有更新嗎? 我正在解決同樣的問題。

或者有什么辦法可以忽略證書?

在嘗試設置使用 greenlock 的項目時,我遇到了完全相同的錯誤。 發生這種情況是因為很明顯 greenlock 試圖從設置證書的機器訪問http://example.com

從 Internet 訪問http://example.com會得到如下所示的回復

curl -i http://example.com
HTTP/1.1 301 Moved Permanently
Location: https://example.com/
Content-Type: text/html; charset=utf-8
Date: Thu, 14 Jul 2022 13:39:01 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 215
[...]

但是,當我嘗試從我嘗試使用 greenlock 設置證書的機器訪問http://example.com時,請求超時。 這是由於網絡問題而發生的,從內部網絡訪問 example.com 實際上無法正常工作。 我如何修復它是通過在 /etc/hosts 中添加“127.0.0.1 example.com”以將 example.com 解析到本地主機。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM