I ran this command: sudo certbot --apache
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
ssl_module is statically linked but --apache-bin is missing; not disabling session tickets.
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for domain
Cleaning up challenges
Error while running apachectl graceful.
httpd not running, trying to start
Unable to restart apache using [‘apachectl’, ‘graceful’]
Encountered exception during recovery:
Traceback (most recent call last):
File “/usr/local/Cellar/certbot/1.6.0/libexec/lib/python3.8/site-packages/certbot/_internal/auth_handler.py”, line 70, in handle_authorizations
resps = self.auth.perform(achalls)
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/configurator.py”, line 2511, in perform
http_response = http_doer.perform()
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/http_01.py”, line 76, in perform
self._mod_config()
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/http_01.py”, line 111, in _mod_config
for vh in self._relevant_vhosts():
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/http_01.py”, line 162, in _relevant_vhosts
raise errors.PluginError(
certbot.errors.PluginError: 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.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/configurator.py”, line 2419, in _reload
util.run_script(self.option(“restart_cmd”))
File “/usr/local/Cellar/certbot/1.6.0/libexec/lib/python3.8/site-packages/certbot/util.py”, line 115, in run_script
raise errors.SubprocessError(msg)
certbot.errors.SubprocessError: Error while running apachectl graceful.
httpd not running, trying to start
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/Cellar/certbot/1.6.0/libexec/lib/python3.8/site-packages/certbot/_internal/error_handler.py”, line 125, in _call_registered
self.funcs-1
File “/usr/local/Cellar/certbot/1.6.0/libexec/lib/python3.8/site-packages/certbot/_internal/auth_handler.py”, line 243, in _cleanup_challenges
self.auth.cleanup(achalls)
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/configurator.py”, line 2540, in cleanup
self.restart()
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/configurator.py”, line 2410, in restart
self._reload()
File “/usr/local/Cellar/certbot/1.6.0/libexec/vendor/lib/python3.8/site-packages/certbot_apache/_internal/configurator.py”, line 2437, in _reload
raise errors.MisconfigurationError(error)
certbot.errors.MisconfigurationError: Error while running apachectl graceful.
httpd not running, trying to start
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.This text will be hidden`
My web server is (include version): apache 2.4.43
The operating system my web server runs on is: macOS High Sierra 10.13.6
I can login to a root shell on my machine: yes
I’m using a control panel to manage my site: no
The version of my client is: certbot 1.6.0
Apache does properly start with apchectl start and I can access it using localhost:80