简体   繁体   English

在手动模式下生成 Letsencrypt 证书

[英]Generate Letsencrypt certificate in manual mode

I am trying to generate a Letsencrypt certificate using --manual plugin.我正在尝试使用 --manual 插件生成 Letsencrypt 证书。 I use "manual" because in my server I have python2.6 and I need python2.7 almost so I generate the certificate from my laptop for then export the certificat.我使用“手册”是因为在我的服务器中我有 python2.6 并且我几乎需要 python2.7 所以我从我的笔记本电脑生成证书然后导出证书。 In my case I only can use http 8280 port or https 443 port.就我而言,我只能使用 http 8280 端口或 https 443 端口。 So the command I use is:所以我使用的命令是:

./letsencrypt-auto certonly --manual --http-01-port 8280

Then it ask to create a secret file on my website and give me a command to do it.然后它要求在我的网站上创建一个秘密文件并给我一个命令。 After this I have these errors:在此之后,我有这些错误:

Failed authorization procedure. mydomain.es (http-01): 
urn:acme:error:connection :: The server could not connect to the client to verify the domain :: 
Could not connect to http://mydomain.es/.well-known/acme-challenge/_6UES5rHkQ78etjN3HmT4n2l5J66vDs1nCX2APzuzIE

I can acces to my secret file by web navigator so I am sure the conexion with the server is posible.我可以通过网络导航器访问我的秘密文件,所以我确信与服务器的连接是可能的。 In http://mydomain:8280/.well-known/acme-challenge/ I can see the secret file generated.http://mydomain:8280/.well-known/acme-challenge/我可以看到生成的机密文件。 So I do not have idea why the server could not connect to the client.所以我不知道为什么服务器无法连接到客户端。

LetsEncrypt server does not support switch http port on production yet. LetsEncrypt 服务器尚不支持在生产中切换 http 端口 And as stated here it will never support arbitrary ports (like 8280 as you are trying).正如此处所述它永远不会支持任意端口(如您正在尝试的 8280)。 They say it maybe support another privileged port (below 1024) in the future. 他们说它将来可能会支持另一个特权端口(低于 1024)。

Carefully inspecting your error message one can read:仔细检查您的错误消息可以阅读:

Could not connect to http://mydomain.es/[...]

As shown, Letsencrypt is trying to reach your server at port http 80 (no port specified in the URL means default port 80).如图所示,Letsencrypt 正在尝试通过http 80端口访问您的服务器(URL 中未指定端口意味着默认端口 80)。

Edit:编辑:

You may be able to run tls-sni-01 authentication with standalone mode since you have port 443 availabl.您可以使用独立模式运行 tls-sni-01 身份验证,因为您有可用的 443 端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM