Hi,
I've read other posts for the "Unable to find a virtual host listening on port 80" error, but my issue seems to be different.
Since certbot isn't autorenewing, I run
sudo certbot renew --dry-run
and I get "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."
Following other threads, I ran
apachectl -t -D DUMP_VHOSTS
and it gives me:
VirtualHost configuration:
*:443 example-dev-vm.c.shs-server.internal (/etc/apache2/sites-enabled/default-ssl.conf:2)
So, default-ssl.conf
contains (comments and unused code edited out):
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/example.com/cert.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/example.com/privkey.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/example.com/chain.pem"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
Do I add a <VirtualHost *:80> in the default-ssl.conf
file?
Running:
Debian 9
Apache 2.4
Certbot 0.28.0-1~deb9u2