我在letsencrpt的certbot中添加了一个新的证书,当我重新启动apache2时,就发生了这种情况。
sudo apache2ctl configtest
apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 14 of /etc/apache2/sites-enabled/in.morphing.myop-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.发布于 2020-08-24 09:51:29
我遇到了一些类似的问题。我更新到了Raspbian拉伸,问题开始了。当使用certbot-auto时,无法创建虚拟环境。我开始卸载和重新安装各种各样的东西,并一直没有遇到错误。最后,我取消了/etc/ network /接口中的配置,因为它需要在/etc/dhcpcd.conf中,否则网络接口会出错,dhcpcd服务将无法正确启动。
在那之后,我得以续签证书,但遇到了你的问题。我认为在安装和重新安装的文件删除。因此,我从Apache2文件夹复制了配置文件:
cp /etc/letsencrypt/certbot-ci/certbot_integration_tests/assets/sample-config/options-ssl-apache.conf /etc/letsencrypt/options-ssl-apache.conf然后,我禁用SSL,并在启用站点的文件夹中禁用默认的conf中的重定向。(我的站点重定向到不同的端口和地址,不确定这是否适用于您)。
sudo a2dismod ssl
sudo service apache2 restart然后,服务得以启动,我得以更新证书。然后,我确保转移到正确位置的证书和配置文件/etc/apache2/sites-enabled/000-default-le-ssl.conf包含正确的证书路径。(我有我的域-001.nl/Fulchain.pem,而在新配置中,它是mydomain.nl/Fulchain.pem。
再次启用SSL:
sudo a2enmod ssl
sudo service apache2 restart最后,它又起作用了:)我不是专家,但我希望这能帮助你解决这个问题。随时可以问任何其他的问题。
https://askubuntu.com/questions/1269627
复制相似问题