Apache 生成[www]证书后,[www]域出现Certbot/letsencrypt错误
我使用certbot设置了两个站点(下面的链接),并在生成HTTPS证书时输入了域的“www.”部分,导致两个站点的非www URL出现错误 在StackOverflow上有许多类似的问题,但到目前为止还没有一个解决我的问题 相关链接Apache 生成[www]证书后,[www]域出现Certbot/letsencrypt错误,apache,ssl-certificate,ubuntu-18.04,lets-encrypt,certbot,Apache,Ssl Certificate,Ubuntu 18.04,Lets Encrypt,Certbot,我使用certbot设置了两个站点(下面的链接),并在生成HTTPS证书时输入了域的“www.”部分,导致两个站点的非www URL出现错误 在StackOverflow上有许多类似的问题,但到目前为止还没有一个解决我的问题 相关链接 工作域 无效域(因为缺少“www.”) 尝试修复命令 sudo certbot certonly--standalone-d fastsitephp.com-d www.fastsitephp.com sudo certbot delet
- sudo certbot certonly--standalone-d fastsitephp.com-d www.fastsitephp.com
- sudo certbot delete--证书名称www.fastsitephp.com
- Ubuntu 18.04 LTS与Apache
提前谢谢你 最后我自己解决了。主要问题是,即使在运行delete之后,Certbot仍然保留它创建的HTTP->HTTPS重定向和一些其他Apache配置设置(假设您在原始设置中选择了从HTTP重定向到HTTPS) 如果其他人有此问题,需要完全删除Certbot生成的证书,我使用以下命令:
sudo certbot delete
cd /etc/apache2/sites-enabled
ls
sudo nano 000-default.conf
# Remove the redirect
sudo rm 000-default-le-ssl.conf
# Also any file other SSL files such as [000-default-le-ssl.conf.sav]
sudo certbot --apache
# enter both Domains "example.com www.example.com"
sudo service apache2 restart