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. https://crt.sh/?q=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:
pariahkite.ga

I ran this command:

root@li2203-136:~# sudo certbot --apache

It produced this output:

root@li2203-136:~# sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated)  (Enter 'c' to cancel): pariahkite.ga
Requesting a certificate for pariahkite.ga
Performing the following challenges:
http-01 challenge for pariahkite.ga
Cleaning up challenges
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.

My web server is (include version):

Server version: Apache/2.4.38 (Debian)

The operating system my web server runs on is (include version):

Debian GNU/Linux 10 (buster)

My hosting provider, if applicable, is:
Linode

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):
Not sure what that means. I use the Linode Cloud Manager and the control panel of my domain registrar. :man_shrugging:t4:

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

certbot 1.11.0
2 Likes

Welcome to the Let's Encrypt Community :slightly_smiling_face:

Your apache configuration does not have a ServerName pariahkite.ga line inside a VirtualHost block.

What is the output of this:

sudo apachectl -S

3 Likes
root@li2203-136:~# apachectl -S
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:1
VirtualHost configuration:
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default 
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
2 Likes
3 Likes

I think you should include the "WWW" in your configs and certificate:
As the DNS points to same IPs:

Name:      pariahkite.ga
Addresses: 2400:8904::f03c:92ff:fe07:ecfa
           192.46.213.136

Name:      www.pariahkite.ga
Addresses: 2400:8904::f03c:92ff:fe07:ecfa
           192.46.213.136
2 Likes

I fully concur with @rg305.

Put a ServerAlias www.pariahkite.ga line right below the ServerName pariahkite.ga line to accomplish this in apache.

2 Likes

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