Unable to find a virtual host listening on port 80

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: seibercom.net

I ran this command: certbot renew --apache --deploy-hook "service dovecot restart"

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /usr/local/etc/letsencrypt/renewal/seibercom.net.conf


Certificate is due for renewal, auto-renewing...
Unable to read ssl_module file; not disabling session tickets.
Plugins selected: Authenticator apache, Installer apache
Renewing an existing certificate for seibercom.net and 3 more domains
Performing the following challenges:
http-01 challenge for mystic.seibercom.net
http-01 challenge for seibercom.net
http-01 challenge for www.mystic.seibercom.net
http-01 challenge for www.seibercom.net
Cleaning up challenges
Failed to renew certificate seibercom.net with error: 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.


All renewals failed. The following certificates could not be renewed:
/usr/local/etc/letsencrypt/live/seibercom.net/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

Command exit status: 1
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /usr/local/etc/letsencrypt/renewal/seibercom.net.conf


Certificate is due for renewal, auto-renewing...
Unable to read ssl_module file; not disabling session tickets.
Plugins selected: Authenticator apache, Installer apache
Renewing an existing certificate for seibercom.net and 3 more domains
Performing the following challenges:
http-01 challenge for mystic.seibercom.net
http-01 challenge for seibercom.net
http-01 challenge for www.mystic.seibercom.net
http-01 challenge for www.seibercom.net
Cleaning up challenges
Failed to renew certificate seibercom.net with error: 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.


All renewals failed. The following certificates could not be renewed:
/usr/local/etc/letsencrypt/live/seibercom.net/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

Command exit status: 1

My web server is (include version): Apache/2.4.54 (FreeBSD)

The operating system my web server runs on is (include version): FreeBSD 13.1-RELEASE-p1

My hosting provider, if applicable, is: Spectrum

I can login to a root shell on my machine (yes or no, or I don't know): YES

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): NO

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.29.0

This is part of the error message in the letencrypt.log file:
2022-08-14 07:02:55,176:DEBUG:certbot_apache._internal.configurator:[Errno 2] No such file or directory: '/usr/local/etc/apache24/libexec/apache24/mod_ssl.so'

The correct path is: /usr/local/libexec/apache24/mod_ssl.so

Perhaps that is causing the problem. It was not happening until recently, though.


This problem only recently started. I am running FreeBSD 13.1-RELEASE-p1

It seems like Apache is up to some mischief.
Let's have a look at the output of:
apachectl -t -D DUMP_VHOSTS

3 Likes

When run as a regular user:

$ apachectl -t -D DUMP_VHOSTS
AH00526: Syntax error on line 146 of /usr/local/etc/apache24/extra/httpd-ssl.conf:
SSLCertificateFile: file '/usr/local/etc/letsencrypt/live/seibercom.net/fullchain.pem' does not exist or is empty

When run as root:

apachectl -t -D DUMP_VHOSTS

VirtualHost configuration:
*:443 seibercom.net (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)

Is that the only line?

What happened to the HTTP vhost config?

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.