标签: certbot

未找到 Certbot

我使用以下命令在我的 ubuntu 16.04 机器上安装了 Letencrypt。

sudo apt-get install letsencrypt
Run Code Online (Sandbox Code Playgroud)

现在,我想定义一个 cronjob 以使用以下行自动更新我的证书。

certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
Run Code Online (Sandbox Code Playgroud)

但我总是收到错误,即找不到命令 certbot。

如果我使用 letencrypt 而不是 certbot 一切正常,只要我不使用--pre-hook--post-hook

如何安装certbot或是否有让letsencrypt 定义此类钩子的替代命令?

谢谢

ssl lets-encrypt ubuntu-16.04 certbot

5
推荐指数
3
解决办法
2万
查看次数

Nginx配置,文件夹权限和加密

我正在尝试在我的Ubuntu 16.0.4服务器上使用certbot和letencrypt,因此可以安装邮件服务器。

我正在像这样运行certbot:

sudo / opt / letsencrypt / certbot-auto certonly --agree-tos --webroot -w / path / to / www / example -d example.com -d www.example.com

我从certbot获得以下输出(如下所示的片段):

   Domain: www.example.com
   Type:   unauthorized
   Detail: Invalid response from
   http://www.example.com/.well-known/acme-challenge/QEZwFgUGOJqqXHcLmTmkr5z83dbH3QlrIUk1S3JI_cg:
   "<html>
   <head><title>404 Not Found</title></head>
   <body bgcolor="white">
   <center><h1>404 Not Found</h1></center>
   <hr><center>"

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A record(s) for that domain
   contain(s) the right IP address.
Run Code Online (Sandbox Code Playgroud)

这是我的目录结构:

root@yourbox:/path/to/www/example$ ls -la
total …
Run Code Online (Sandbox Code Playgroud)

file-permissions nginx lets-encrypt ubuntu-16.04 certbot

5
推荐指数
1
解决办法
1987
查看次数

未定义的符号:OPENSSL_sk_num

我正在尝试使用Certbot续订Let's Encrypt证书.它停止工作,我不知道为什么.这是错误:

ImportError: /root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/
hazmat/bindings/_openssl.so: undefined symbol: OPENSSL_sk_num
Run Code Online (Sandbox Code Playgroud)

我安装了最新的OpenSSL版本

OpenSSL 1.1.0d  26 Jan 2017
Run Code Online (Sandbox Code Playgroud)

我尝试通过执行以下操作来调试此问题.首先我尝试在python控制台中添加导入OpenSSL.它工作得很好,没有错误.但是,当我尝试

. ~/.local/share/letsencrypt/bin/activate
Run Code Online (Sandbox Code Playgroud)

然后>>> import OpenSSl 我得到错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/OpenSSL/rand.py", line 12, in <module>
    from OpenSSL._util import (
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib …
Run Code Online (Sandbox Code Playgroud)

pyopenssl python-2.7 certbot

5
推荐指数
1
解决办法
5380
查看次数

让我们在JustHost共享Linux服务器上加密

尝试使用Let的加密在我的justhost服务器上安装SSL证书.它正在运行Apache CentOS 6.4.

我确实有SSH访问权限,因此使用了certbot.它下载到服务器但我无法运行它.

看起来有各种手动选项.

想知道是否有人在justhost上运行这些手动选项或certbot之一.

我正在使用共享服务器,因此问题可能是我没有root访问权限.

lets-encrypt certbot

5
推荐指数
0
解决办法
456
查看次数

Certbot :ImportError: 没有名为“requests.packages.urllib3”的模块

我在 centos 上使用 nginx 7.3

我按照https://certbot.eff.org/#centosrhel7-nginx安装了 certbot

运行时出现错误 certbot --nginx

[root@demo src]# certbot --nginx
Traceback (most recent call last):
  File "/usr/bin/certbot", line 9, in <module>
    load_entry_point('certbot==0.14.1', 'console_scripts', 'certbot')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 564, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2662, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/site-packages/certbot/main.py", line 14, in <module>
    from certbot import account
  File "/usr/lib/python2.7/site-packages/certbot/account.py", …
Run Code Online (Sandbox Code Playgroud)

nginx centos7 lets-encrypt certbot

5
推荐指数
1
解决办法
5066
查看次数

没有可用的包 certbot

我正在尝试在 RHEL 服务器上安装 certbot。

启用 epel-release 的说明

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Run Code Online (Sandbox Code Playgroud)

然后

# subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms

安装了 epel-release-7-11。

# yum install certbot
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package certbot available.
Error: Nothing to do
Run Code Online (Sandbox Code Playgroud)

我什至从Fedora 项目 epel手动下载了 rpm

删除并清除所有缓存。但是安装包不可用。

rhel epel lets-encrypt certbot

5
推荐指数
2
解决办法
9620
查看次数

如何修复 ImportError: No module named cryptography?

我想通过 certbot 自动续订证书,但不起作用,出现错误“ImportError: No module named cryptography”

# ./certbot-auto --dry-run

错误:无法获取当前安装的 /opt/eff.org/certbot/venv/bin/letsencrypt 版本:回溯(最近一次调用):文件“/opt/eff.org/certbot/venv/bin/letsencrypt” ,第 7 行,在 from certbot.main import main 文件“/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py”,第 10 行,在 import josepy as何塞文件“/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/ INIT.py”,第 41 行,来自 josepy.interfaces 导入 JSONDeSerializable 文件“/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py”,第 7 行,在从 josepy 导入错误,util 文件“/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py”,第 7 行,导入 OpenSSL 文件“/opt/eff .org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/ init .py”,第 8 行,来自 OpenSSL 导入加密,SSL 文件“/opt/eff.org/certbot/venv/local /lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in from cryptography import x509 ImportError: No module named cryptography

我尝试安装密码学,并得到了这个结果

sudo /opt/eff.org/certbot/venv/bin/pip 安装密码

您使用的是 pip 版本 9.0.1,但版本 19.2.3 可用。您应该考虑通过“pip install --upgrade pip”命令进行升级。

然后我尝试了这个命令 pip install …

cryptography pip certbot

5
推荐指数
1
解决办法
4378
查看次数

如何查看 Certbot 制作的 SSL 证书中的所有域?

我创建了一个多域证书并忘记了我包含在其中的域。我怎么能看到他们?我怎样才能得到这个列表?

到目前为止,我只找到了一种获取到期日期的方法

$ sudo openssl x509 -noout -dates -in /opt/blah-blah/apache2/conf/server.crt
Run Code Online (Sandbox Code Playgroud)

certbot

5
推荐指数
1
解决办法
3136
查看次数

Certbot - DNS 问题:NXDOMAIN 正在查找 A 中的 xxx - 检查该 DNS 记录是否存在

所以我尝试运行以下命令

sudo certbot certonly --nginx --dry-run -d subdomain.domain.com -d www.subdomain.domain.com
Run Code Online (Sandbox Code Playgroud)

这给了我一个 DNS 问题,但是,它在运行时有效

sudo certbot certonly --nginx --dry-run -d subdomain.domain.com
Run Code Online (Sandbox Code Playgroud)

我的 DNS 记录中是否遗漏了某些内容?

我已经成功运行了

sudo certbot certonly --nginx --dry-run -d domain.com -d www.domain.com
Run Code Online (Sandbox Code Playgroud)

如果我使用子域名,是否需要为“www”部分创建特定的 DNS 记录?

编辑 运行“dig subdomain.domain.com”的结果

; <<>> DiG 9.11.5-P4-5.1ubuntu2.1-Ubuntu <<>> subdomain.domain.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45932
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, …
Run Code Online (Sandbox Code Playgroud)

subdomain certbot godaddy-api

5
推荐指数
3
解决办法
2万
查看次数

禁用让我们加密 certbot 每日更新电子邮件

在 cronjob 上运行时,是否可以告诉 certbot 不要每天给我发电子邮件?

我的定时任务是:

0 0 * * * sudo /usr/bin/certbot renew --post-hook "sudo service nginx reload"
Run Code Online (Sandbox Code Playgroud)

我收到电子邮件:

Cert not yet due for renewal
Run Code Online (Sandbox Code Playgroud)

我只想在证书需要续订、续订失败或已续订时收到电子邮件。

我不需要每天收到通知,没有什么可以更新。

lets-encrypt certbot

5
推荐指数
1
解决办法
632
查看次数