【问题标题】:Certbot Timeouts [duplicate]Certbot 超时 [重复]
【发布时间】:2018-03-25 03:48:37
【问题描述】:

有人可以提供一份清单,列出需要设置的内容,以便 certbot 可以给我发一个letsencrypt SSL吗?我无法验证它并超时。

我可以通过域名访问。在 http 和 https 上。所以我知道虚拟主机文件设置正确。而且我知道这也不是防火墙或 dns 问题。

我没有使用 .htaccess 文件夹或任何东西,只是一个带有 hello world 索引的空目录。

目录权限设置为 777

我想不出还有什么要检查的?

【问题讨论】:

  • 您也可以分享 certbot cli 响应吗?

标签: timeout lets-encrypt certbot


【解决方案1】:

找到了我的问题,这不是机器上配置的任何东西,而是我的 DNS 配置的问题。我的 IPv4 地址有 A 记录,IPv6 地址有 AAA 记录,这导致了问题。决议是除掉其中一个,然后认证顺利进行。

【讨论】:

    【解决方案2】:

    你需要(来自来源)

    • Webroot 方法需要端口 80 上的 HTTP 以供 Certbot 验证。
    • 服务器名称必须与其对应的 DNS 匹配。
    • 可能需要更改主机上的权限以允许对http://domain.tld/.well-known 进行读取访问。

    我是如何创建和配置 Certbot、SSL Cert 和 Nginx 的:

    创建证书的命令

    certbot certonly --webroot \  
    --webroot-path /usr/share/nginx/html \
    --renew-by-default -d <YOUR_HOST_NAME.COM> \
    --config-dir ~/.certbot/config \
    --logs-dir ~/.certbot/logs \
    --work-dir ~/.certbot/work
    

    在我的 nginx 配置中,

    location ^~ /.well-known/acme-challenge/ {  
        allow all;
        root /var/lib/letsencrypt/;
        default_type "text/plain";
        try_files $uri =404;
    }
    

    在 Apache 中,创建一个新文件

    /etc/httpd/conf/extra/httpd-acme.conf

    Alias /.well-known/acme-challenge/ "/var/lib/letsencrypt/.well-known/acme-challenge/"
    <Directory "/var/lib/letsencrypt/">
        AllowOverride None
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        Require method GET POST OPTIONS
    </Directory>
    

    并包含在/etc/httpd/conf/httpd.conf

    参考文献

    【讨论】:

      猜你喜欢
      • 2017-12-07
      • 2020-01-22
      • 1970-01-01
      • 2023-03-19
      • 2011-03-29
      • 2011-08-27
      • 2014-09-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多