我还没有真正了解如何使用 certbot 为 nginx 创建(工作)证书。
我的网站启用现在看起来像这样:
首先,使用 SSL 阻止 www 域。所有 SSL 的东西都是由 certbot 创建的。
server {
root …
index …
server_name www.doman.com
listen 443 ssl;
ssl_certificate …
ssl_certificate_key …
include …
ssl_dhparam …
}
Run Code Online (Sandbox Code Playgroud)
在此之后,为 www 和非 www 从端口 80 重定向到端口 443。第一部分——if 语句——是由 certbot 创建的,而不是我。
server {
if ($host = www.example.com {
return 301 https://$host$request_uri;
}
listen *:80;
server_name domain.com www.example.com;
return 301 https://www.example.com$request_uri;
Run Code Online (Sandbox Code Playgroud)
}
最后,一个没有 www 的 443 块。我希望这重定向到 www。
server {
listen 443;
server_name www.domain.com
return 301 …Run Code Online (Sandbox Code Playgroud) 我最近建立了一个网站certbot --nginx -d <domain>。在 中/etc/letsencrypt/options-ssl-nginx.conf,我将 TLSv1.3 添加到ssl_protocols指令中。但是,当我访问该站点 (Chrome 68) 时,安全选项卡显示 TLSv1.2。我使用 ssllabs.com 测试了该站点,该站点还显示仅启用了 TLS 版本 1.0-1.2。
我在journalctl -u nginx.service | grep -i tls或 中没有看到任何错误grep -i tls /var/log/nginx/*.log。
我该如何解决这个问题?我已经检查了所有配置文件和所有日志文件,但没有找到问题的根源(或任何信息)。
软件信息:
站点配置(由 生成certbot):https : //hastebin.com/oragojozol.nginx
/etc/letsencrypt/options-ssl-nginx.conf: https://hastebin.com/cepalomisi.nginx
我正在运行Debian并且必须certbot创建Let's Encrypt证书。
我充当 TLS 服务器的客户端,需要移交我的客户端证书以供批准。
我有以下文件生成certbot:
/etc/letsencrypt/live/my-client-server-domain/privkey.pem
/etc/letsencrypt/live/my-client-server-domain/fullchain.pem
/etc/letsencrypt/live/my-client-server-domain/chain.pem
Run Code Online (Sandbox Code Playgroud)
我应该交出哪个证书,公开共享是否安全?
我有一台安装了 Let's encrypt 证书并安装了 certbot 的服务器。我想用以下命令更新它
sudo certbot renew --force-renewal
但我收到错误:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/mydomain.conf
- - - - - - - - - - - - - - - - - - - - - - …Run Code Online (Sandbox Code Playgroud) 我正在使用 Let's Encrypt 来保护 Ubuntu 上的 Apache 安装。我最近设置了一个部署挂钩脚本以在续订时运行,我正在certbot renew使用该--deploy-hook选项在 cron 作业中传递给它。
在设置后的第一次更新时,我注意到部署钩子脚本没有运行。深入研究日志,我发现certbot renew实际执行更新的调用并未使用--deploy-hook参数调用。
我还看到它certbot renew每天被调用 3 次,而我的 cron 作业只设置为每天运行一次。这三个调用之一恰好在 cron 作业中指定的时间,并且--deploy-hook提供了参数。另外两个时间是大约 00:30 和大约 12:45,但确切的时间每天都有几分钟的变化。--deploy-hook其他调用不提供该参数。
那么:certbot renew除了我的 cron 工作之外,到底在运行什么?我确认只有root一个crontab, 并且它只包含单个作业定义。
我无法解决以下问题。使用 openssl 验证服务器的证书失败,链不完整。
$ openssl verify -CAfile /etc/letsencrypt/live/co2-avatar.com/fullchain.pem /etc/letsencrypt/live/co2-avatar.com/cert.pem
# /etc/letsencrypt/live/co2-avatar.com/cert.pem: C = US, O = Internet Security Research Group, CN = ISRG Root X1
# error 2 at 2 depth lookup:unable to get issuer certificate
Run Code Online (Sandbox Code Playgroud)
openssl s_client -connect co2avatar.org:443 -servername co2avatar.org
# CONNECTED(00000003)
# depth=0 CN = gitlab.sustainable-data-platform.org
# verify error:num=20:unable to get local issuer certificate
# verify return:1
# depth=0 CN = gitlab.sustainable-data-platform.org
# verify error:num=21:unable to verify the first certificate
# …Run Code Online (Sandbox Code Playgroud) 网址:https : //vishnubathala.com/
**Error**
Subject: www.example.com
Issuer: www.example.com
Expires on: Aug 3, 2027
Current date: Nov 9, 2017
PEM encoded chain:
-----BEGIN CERTIFICATE-----
MIICsDCCAZgCCQDghBagwkXvoDANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA93
d3cuZXhhbXBsZS5jb20wHhcNMTcwODA0MTIxNDAzWhcNMjcwODAyMTIxNDAzWjAa
MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDJtN/s4VlruDpshzeRsdhi3AIobpNHOA0n5oCCgMqZH89M2NTW
yxnau116LUwgBAehawRgfaqmy/lY51WUmE7c0otuFJzssCBzQ2hUwBwWLOVmZTta
hwX2EqDrQ1JZWiAXSMO5ljwq+RrUyxZXSxvqIBVctIlgkMOYZRaXtXnkCtos5YL8
GNbMBwrhhUgk7SYcMH4y8u8L2oAudCI1v4oih7WRz0W20FWzLRYZjjZOpDiiBPG/
BlOXzWKkt/HW/URwQUejharNUQmrmvPiwnbXpR52wcqWS2eSyAhjapj7mmcrbTyA
wDyI8uFRD0LgMGdzHa6WkUykEaJLNux3rPXXAgMBAAEwDQYJKoZIhvcNAQELBQAD
ggEBAIwQo04ESpiWOR4pRv+V+DTDdSoEO7AARADD6pmiuraA/qL9HA+kfgxFWpdH
iKiWERTOFLhyjkkeE/eTRDdJwNMVubu0HFSASkfciKlX7HkLBmA1cCEOrUIvMfH0
mDGpolc50jKQt+JSF1qtiyrvy2P8ccAhyG+Ub4EzZddVRWbio87v0Iiho4OtjcLQ
x1vlxq5rKUzcbF7JTY8dt3fntFFKFU3aLI2eoYxuqeQFod6AcTSgCI81vES1FevN
bVbad9bTpGs9f4IhF/Dm9dRvV79n3eV2IsNMyE9HxdEfz900PblsjvpRz+I4Xwkn
6h9BQWroYn3GfzbvOML1HlPLvNo=
-----END CERTIFICATE-----
Run Code Online (Sandbox Code Playgroud)
我按照 ubuntu 14.04 版本的 certbot 中的安装步骤操作,但我不确定服务器会发生什么我收到此错误我该如何解决此错误?
我不确定我的配置是否正确通过我想在没有任何错误的情况下配置它请帮我解决这个问题
ssl-certificate amazon-web-services ubuntu-14.04 lets-encrypt certbot
我正在尝试更新旧的电子邮件地址,该地址用于接收来自令人惊叹的 Letscrypt 的到期通知。但是,我没有找到一种方法可以令人惊奇地做到这一点:O。
然而我确实尝试过:我删除了旧证书,希望 certbot 会询问我有关新电子邮件的信息,但事实上它没有(可怜的我)
我使用此命令删除了旧证书
certbot delete
Run Code Online (Sandbox Code Playgroud)
然后我选择了我要删除的域。
然后我重新生成一个新的 LetsEncrypt 证书,该证书很成功,没有发现任何错误,并且该网站仍然在线,没有任何进一步的证书问题(值得称赞!):
sudo certbot certonly --nginx -d thecompany.com
Run Code Online (Sandbox Code Playgroud)
但后来,CERTBOT 并没有要求我提供新的电子邮件地址!(我的天啊!)
现在我不知道该怎么办,感觉把头撞到墙上也无济于事,所以,我让手指在键盘上跳舞,并向这里最好的人问了这个问题:)。
非常感谢!
我已经为我启用了 SSLhttps://example.com并且工作正常,但是如果有人尝试进入,https://www.example.com我会收到消息:您的连接不安全。
在检查 SSLcertificate 之前,有没有办法将所有 WWW 重定向到非 http?或者这是否需要在域 dns 设置上完成?
我想用来certbot创建通配符认证,运行后certbot ...它会给我一个哈希值,告诉我等待,直到将它放在我的域的 TXT 记录中。
但我无法直接访问我使用的 DNS 服务。我有一些办公室程序来更新 DNS 设置,这需要时间,所以我不能在此处保持 SSH 窗口打开。如果我重新运行certbot,哈希值会发生变化,并且会出现相同的问题。
等待 DNS 刷新并保持哈希值不变的正确方法是什么?谢谢!
我猜测 certbot 必须作为 Linux 上持续运行的服务运行,但是在使用psLet's Encrypt 证书自动续订的服务器上使用时,我没有看到 certbot 的任何明显过程。如果运行成功,certbot 是否有一个中央进程?如果有,它是什么?
apt-cache policy certbot | grep Installed在我的例子中,我可以找到带有 - 的版本0.25.0-1~bpo9+1
这是我第一次尝试通过 Certbot 更新 Let's Encrypt 证书。仔细阅读 Certbot 用户指南后,我创建了两个如下的 post hook 脚本:
root@pelargir:~# ls -l /etc/letsencrypt/renewal-hooks/post
total 8
-rwxr-xr-x 1 root root 697 Aug 29 16:35 10-setup-courier.sh
-rwxr-xr-x 1 root root 377 Aug 29 16:32 20-restart-services.sh
Run Code Online (Sandbox Code Playgroud)
然后我在命令行上手动运行更新过程(即不通过 cron)。更新证书成功,但未能执行上述 post hook 脚本。这是相关的输出:
[...]
Running post-hook command: /etc/letsencrypt/renewal-hooks/post/10-setup-courier.sh
Hook command "/etc/letsencrypt/renewal-hooks/post/10-setup-courier.sh" returned error code 127
Error output from 10-setup-courier.sh:
/bin/sh: /etc/letsencrypt/renewal-hooks/post/10-setup-courier.sh: not found
Running post-hook command: /etc/letsencrypt/renewal-hooks/post/20-restart-services.sh
Hook command "/etc/letsencrypt/renewal-hooks/post/20-restart-services.sh" returned error code 127
Error output from 20-restart-services.sh:
/bin/sh: /etc/letsencrypt/renewal-hooks/post/20-restart-services.sh: not found
[...] …Run Code Online (Sandbox Code Playgroud) 我想获得一份适用于我所有子域的证书*.example.com。
这有效:
certbot-auto certonly --webroot --webroot-path /home/www/example/ --domain example.com
--domain www.example.com --email certbot@example.com
Run Code Online (Sandbox Code Playgroud)
但这(与 *.):
certbot-auto certonly --webroot --webroot-path /home/www/example/ --domain example.com
--domain *.example.com --email certbot@example.com
Run Code Online (Sandbox Code Playgroud)
失败:
获取新证书
执行以下质询:
具有当前选定身份验证器的客户端不支持满足 CA 的任何质询组合。您可能需要使用可以通过 DNS 进行挑战的身份验证器插件。
如何使用certbot-auto生成证书*.example.com?
certbot ×13
lets-encrypt ×9
ssl ×4
https ×2
nginx ×2
ubuntu ×2
apache-2.2 ×1
cron ×1
linux ×1
security ×1
ubuntu-14.04 ×1