Unable to create certificate

My domain is:
grimstve.it

I ran this command:
sudo certbot

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): grimstve.it www.grimstve.it
Requesting a certificate for grimstve.it and www.grimstve.it
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.
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.

My web server is:
apache2 (2.4.58-1ubuntu8)

The operating system my web server runs on is:
Ubuntu 24.04 LTS

My hosting provider, if applicable, is:
MS Azure

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 2.9.0

Additional info:

HTTP/1.1 works from internet:

curl -Is http://grimstve.it | grep OK
HTTP/1.1 200 OK

1 Like

Welcome Back to the Let's Encrypt Community, Jakob! :slightly_smiling_face:

The issue is that you don't have a specific vHost for port 80 in your Apache configuration for the domain name(s) in question, meaning that you probably have a default/catch-all vHost instead.

What is the output of the following command?

sudo apachectl -S

Please post the output like this:

```
output
```

5 Likes

Nice, Griffin - thank you! You pointed me in the right direction, and I found some stray config files relating to an earlier attempt to set up https for the domain.

I rectified some stale symlinks and removed the leftover references to files in /etc/letsencrypt/live/… which was no longer there.

That, in addition to removing the www ServerAlias from the Apache config made it a breeze to set up. Now server is running happy and smooth.

Thanks for the assist!

5 Likes

Glad I was able to assist. :slightly_smiling_face:

4 Likes