我有一台CentOS服务器,我正在尝试使用以下命令安装Apache证书:
certbot --apache -d myDomain.com
但我收到以下错误:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for myDomain.com
Error while running apachectl graceful.
Job for httpd.service invalid.
Cleaning up challenges
Error while running apachectl graceful.
Job for httpd.service invalid.
Encountered exception during recovery
Error while running apachectl graceful.
Job for httpd.service invalid.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/certbot/error_handler.py", line 100, in _call_registered
self.funcs[-1]()
File "/usr/lib/python2.7/site-packages/certbot/auth_handler.py", line 284, in _cleanup_challenges
self.auth.cleanup(achalls)
File "/usr/lib/python2.7/site-packages/certbot_apache/configurator.py", line 1945, in cleanup
self.restart()
File "/usr/lib/python2.7/site-packages/certbot_apache/configurator.py", line 1834, in restart
self._reload()
File "/usr/lib/python2.7/site-packages/certbot_apache/configurator.py", line 1845, in _reload
raise errors.MisconfigurationError(str(err))
MisconfigurationError: Error while running apachectl graceful.
Job for httpd.service invalid.
Error while running apachectl graceful.
Job for httpd.service invalid.
我检查Apache是否正在运行:
ps aux|grep httpd
root 16569 0.0 0.0 9064 920 pts/1 S+ 14:44 0:00 grep --color=auto httpd
我没有运行apache的实例。
你们中的任何人都知道如何修复此错误或者是否有解决方法?
我非常感谢你的帮助。
答案 0 :(得分:0)
certbot显然正在尝试启动/重启apache并且失败了。可能有很多原因,我首先会查找apache错误日志并查看它有什么。 (可以有多个,所以请检查时间戳。)
知道apache是否可以启动也很有趣。普通旧apachectl start
会发生什么?