【问题标题】:Let's Encrypt Unable to find a virtual host listening on port 80Let's Encrypt 找不到监听 80 端口的虚拟主机
【发布时间】:2020-10-12 21:47:05
【问题描述】:

■背景

尝试通过 Let's Encrypt 获取 SSL

■问题

运行下面的代码,

sudo certbot --apache -d hogehoge.com

我收到端口 80 错误

Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.

无法解决此错误

■我的尝试

已经设置了 80 端口

vim /etc/httpd/conf/httpd.conf

在文件中添加描述。

 NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin root@hogehoge
DocumentRoot /var/www/html
ServerName hogehoge
</VirtualHost>

但我仍然遇到同样的错误。

您能告诉我原因以及如何使它起作用吗?

【问题讨论】:

  • 你能分享完整的 httpd.conf 文件吗? (egrep -v ‘#|^$’ /etc/apache2/httpd.conf)。这可能有助于我们了解您的问题。谢谢。
  • ServerName hogehoge - 我认为这是正确的完整域名,只是在这里编辑?你上面有hogehoge.com,它们必须是一样的。

标签: ssl lets-encrypt


【解决方案1】:

本地主机上的默认命令“sudo certbot renew”错误

(1)卸载 certbot (2)重新安装certbot (3)sudo certbot certonly (4)选择选项1,启动临时网络服务器 (5)确保80端口可以从外部访问,路由器中的端口转发 (6) 确保所有使用80端口的服务都停止

试试

RewriteCond %{REQUEST_URI} !.well-known/acme-challenge

Enabling HTTPS on a Single Instance Beanstalk application: Unable to find a virtual host listening on port 80

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-07
    • 2012-05-17
    • 1970-01-01
    • 2022-12-23
    • 2016-05-05
    • 1970-01-01
    • 1970-01-01
    • 2019-05-19
    相关资源
    最近更新 更多