2016-12-28 102 views
1

我正在爲我的webapp安裝一個證書,該證書已部署在我的Amazon AWS中。CertBot未授權 - 無效回覆

./certbot-auto certonly --standalone --standalone-supported-challenges http-01 -d www.mywebsite.com --debug 
當我運行上面的命令

,我得到如下回應

The following errors were reported by the server: 

    Domain: www.mywebsite.com 
    Type: unauthorized 
    Detail: Invalid response from 
    http://www.mywebsite.com/.well-known/acme-challenge/PoX30b9dlmVuf-iU6zcNOo7_l7FaYTiJMgjHR4td8p4: 
    "<html><head><title>Apache Tomcat/7.0.70 - Error 
    report</title><style><!--H1 
    {font-family:Tahoma,Arial,sans-serif;color:white;bac" 

我試圖指向我部署在Apache tomcat server應用。我可以看到.well-known文件夾正在創建,但該文件夾完全是空的。

這是什麼光?

回答

1

很明顯,您的獨立服務器沒有綁定到所需的IP /端口。這就是爲什麼錯誤消息包含來自Tomcat的響應。您推薦停止Tomcat服務器,然後運行certbot-auto --standalone,以便certbot的內置網絡服務器可以提供響應。

+0

的LOCALMACHINE的t​​omcat已關閉,爲什麼它的運行。 apache錯誤你看到的是來自實際域的響應 – madhairsilence

+0

嗯,是的。認證中心**將聯繫您的實際域**。如何驗證您擁有該域名?你的域名應該指向服務器,你正在執行'certbot'的地方。 –

+0

域通過亞馬遜彈性IP指向服務器。 – madhairsilence

0

首先做一個sudo su - 它只會在你使用root用戶的情況下工作。

現在/etc/letsencrypt/config.ini 創建一個文件,並添加

rsa-key-size = 4096 
email = [email protected] 

然後運行

/opt/letsencrypt/letsencrypt-auto renew --config /etc/letsencrypt/config.ini --agree-tos 

,之後加入的crontab

0 1 1 * * /opt/letsencrypt/letsencrypt-auto renew --config /etc/letsencrypt/config.ini --agree-tos && apachectl graceful