Certbot: invalid response from ....... : 404

My domain is:
Gardencitygirl.nl
I ran this command:
sudo certbot certonly --webroot -w /mnt/data/gardencitygirl -d gardencitygirl.nl -d www.gardencitygirl.nl
It produced this output:
Domain: gardencitygirl.nl
Type: unauthorized
Detail: 2a01:448:2001::10: Invalid response from http://gardencitygirl.nl/.well-known/acme-challenge/kBvChuVI6kPnajGp-X5oU8b-cD2YUipjiZp3ElZTJ14: 404

Domain: www.gardencitygirl.nl
Type: unauthorized
Detail: 2a01:448:2001::10: Invalid response from http://www.gardencitygirl.nl/.well-known/acme-challenge/RlCUeiin8KaZIXa9GwH8MTGxDrvuLMOmfqu0Mw8Ybn0: 404
My web server is (include version):
Apache/2.4.58
The operating system my web server runs on is (include version):
ubuntu server/24.04.1
My hosting provider, if applicable, is:
--- (hosted myself)
I can login to a root shell on my machine (yes or no, or I don't know):
yes (full control over the server)
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): i have no idea if that is what you meant by this but i am using cockpit for external access on my server.

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

For the last couple weeks i am trying to make a webserver at home where i will run a not so big website. this website does need payment so i need to setup https for sure. But I am trying to authenticate with certbot and it keep giving me the error: "Invalid response from http://gardencitygirl.nl/.well-known/acme-challenge/kBvChuVI6kPnajGp-X5oU8b-cD2YUipjiZp3ElZTJ14: 404". i first asked chatgpt as i always do but all the methods i used didn't work and now I am stuck. the directory it tells me is invalid is fully accessible in the browser and for testing i gave it 777 permission so i don't know why it is giving this error. I made sure 10 times that there are no typo's in the code and i think that is not the problem. Earlier i had problems with my domain not pointing correctly to the server but that is all fixed and the virtual hosts are also set up good. the domains and subdomains are both pointed to the right documents. I think that was all but i will give any info that is necessary. all the things i did by now are mostly chatgpt so dont expect me to understand al the things from linux and certbot and i would appreciate you using easy language.

thanks for your time

Apparently, previously there was an AAAA RR configured (IPv6). However, that IPv6 address doesn't return your website from the looks of it. And LE prefers IPv6.

I don't see the AAAA RR any longer, so it should be IPv4 only now.

Also, looking at crt.sh | gardencitygirl.nl, you have issued a certificate 8 minutes ago (LE backdates the certs one hour). Are you good to go now?

Edit:
Not good to go apparently. Your webserver responds with HTTP on port 443, which is meant for HTTPS.. So something is seriously wrong with either your webserver configuration or e.g. an incorrect NAT portmap, if applicable.

2 Likes

Thanks for the fast reply, after sending this massege i read another post about somethink simmilar and the problem was that there was a IPv6 address pointing at something what i think is a default address for my domain registrar. So that was think now or so i thought but i dont know if what you told me is a problem. I will tell you a bit more about my setup because i dont know if i made a mistake.

I have a old pc running with ubuntu and apache and i want it to be a functional webserver. I need https for security and that is wokring now . I forwarded port 80 and 443 and setup 2 virtual hosts 1 https and 1 for http. The http one just sends to the https one so users are forced to use https. Is this the right way to do this or do i have to make changes in this configuration

Looks like everything is in order now :slight_smile:

:white_check_mark: redirect
:white_check_mark: HTTPS