正在尝试为我的WebApp安装证书,该证书已部署在我的Amazon AWS中。
./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
文件夹正在创建,但文件夹完全为空。
对此有任何光线?
很明显,您独立的服务器未绑定到所需的IP/端口。这就是为什么错误消息包含tomcat的响应的原因。您shold 停止tomcat服务器,然后运行certbot-auto --standalone
,因此Certbot的Build-In-In-In-In-In-In-In-In-In-In-In-In-in Web服务器可以提供响应。
首先做一个sudo su-仅当您将root用作用户时,它才能起作用。
现在创建一个file/etc/letsencrypt/config.ini并添加
rsa-key-size = 4096
email = example@mail.com
然后运行
/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