AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1005233
Accepted
uncovery
uncovery
Asked: 2020-03-02 19:52:09 +0800 CST2020-03-02 19:52:09 +0800 CST 2020-03-02 19:52:09 +0800 CST

如何安装letsencrypt通配符证书?

  • 772

我在 CentOS 7 上使用 EPEL 存储库中的 certbot/letsencrypt 和 apache,而“正常”域名没有任何问题。certbot 工具可以很好地识别虚拟主机配置文件中的服务器名称别名。续订也可以正常工作。

例如,虚拟主机配置中的一行,例如:

ServerName uncovery.net
ServerAlias www.uncovery.net

导致 certbot 让我安装/维护域名

1: uncovery.net
2: www.uncovery.net

但是,我的虚拟主机配置中的这一行:

ServerName uncovery.net
ServerAlias *.uncovery.net

只显示

1: uncovery.net

运行 certbot 时。

所以我尝试了以下方法:

# certbot -d *.uncovery.net
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA. You may need to use an authenticator plugin that can do challenges over DNS.

我尝试了 apache/webroot/standalone 身份验证器,都失败了。调试日志指出

ConfigurationError: *.uncovery.net contains an invalid character. Valid characters are A-Z, a-z, 0-9, ., and -.

所以问题:

1)如何让certbot的命令行界面识别*.wildcard?

2)如果这不起作用,我该如何手动配置证书?

这是我的 certbot 版本:

Package certbot-1.0.0-1.el7.noarch already installed and latest version
Package python2-certbot-apache-1.0.0-1.el7.noarch already installed and latest version
ssl-certificate apache-2.4 lets-encrypt
  • 1 1 个回答
  • 1292 Views

1 个回答

  • Voted
  1. Best Answer
    Aravinda
    2020-03-02T19:59:39+08:002020-03-02T19:59:39+08:00

    这应该工作

    certbot-auto certonly --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns -d 'uncovery.net,*.uncovery.net'
    

    之后不要忘记指出fullchain.pem并privkey.pem在您的 apache config ssl 设置中。通常,那些位于/etc/letsencrypt/live/uncovery.net/fullchain.pem /etc/letsencrypt/live/uncovery.net/privkey.pem

    如果您不更改这些,您仍然会看到自签名证书,这是 apache 默认的自签名 ssl 证书。

    • 3

相关问题

  • RHEL/Apache ssl.conf 配置问题

  • IIS7 中的证书信任列表

  • SSL证书的区别?

  • 如何修复邮件服务器 SSL?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve