【问题标题】:Let's encrypt certification does not work for nginx on ubuntu让我们加密认证不适用于 ubuntu 上的 nginx
【发布时间】:2020-01-19 23:13:26
【问题描述】:

运行 sudo certbot-auto --nginx 时出现以下错误。我按照本网站https://certbot.eff.org/lets-encrypt/ubuntuother-nginx 中的说明使用 nginx 和 Ubuntu 14

/opt/eff.org/certbot/venv/local/lib/python2.7/site- 
packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a release (2.7.7+) that supports hmac.compare_digest as soon as possible.
  utils.PersistentlyDeprecated2018,
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem") 
failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)

我也不明白 python 警告,因为

python --version
Python 3.6.3

但出于任何原因它使用 python 2

知道目前没有可用的证书可能会很有用

sudo /usr/local/bin/certbot-auto --nginx
/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a release (2.7.7+) that supports hmac.compare_digest as soon as possible.
utils.PersistentlyDeprecated2018,
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/etc/letsencrypt/live/www.benty-fields.com/fullchain.pem\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)

【问题讨论】:

    标签: nginx lets-encrypt


    【解决方案1】:

    我修好了……

    必须删除一些文件中的 certbot 链接,这些文件可以通过

    找到
    grep -R /etc/letsencrypt/live/example.com/fullchain.pem /etc/nginx/ 
    

    【讨论】:

      猜你喜欢
      • 2020-06-29
      • 2018-10-20
      • 1970-01-01
      • 2019-01-13
      • 2018-08-30
      • 2017-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多