【发布时间】: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