Invalid response from http://westnab.com (404)

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: westnab.com

I ran this command: $ sudo certbot --apache -v

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

Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?

We recommend selecting either all domains, or all domains in a VirtualHost/server block.

`-


      • -`

1: westnab.com

2: www.westnab.com

`-


      • -`

Select the appropriate numbers separated by commas and/or spaces, or leave input

blank to select all options shown (Enter 'c' to cancel):

Requesting a certificate for westnab.com and www.westnab.com

Performing the following challenges:

http-01 challenge for westnab.com

http-01 challenge for www.westnab.com

Enabled Apache rewrite module

Waiting for verification...

Challenge failed for domain westnab.com

Challenge failed for domain www.westnab.com

http-01 challenge for westnab.com

http-01 challenge for www.westnab.com

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:

Domain: westnab.com

Type: unauthorized

Detail: 213.171.213.201: Invalid response from http://westnab.com/.well-known/acme-challenge/b_PhgDI3StyTocYn39y5I4_R05Ym7jT2tiyTNgjIPzM: 404

Domain: www.westnab.com

Type: unauthorized

Detail: 213.171.213.201: Invalid response from http://www.westnab.com/.well-known/acme-challenge/02vFLBEZRYEz3TatOZeRZz2nyeXWoeh7eXN1xYcYgtU: 404

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

Cleaning up challenges

Some challenges have failed.

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.

Looking at the letsencrypt.log file mentioned at the end of the above, there is lots of stuff going on, but the problem seems to be:

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:

Domain: westnab.com

Type: unauthorized

Detail: 213.171.213.201: Invalid response from http://westnab.com/.well-known/acme-challenge/b_PhgDI3StyTocYn39y5I4_R05Ym7jT2tiyTNgjIPzM: 404

Domain: www.westnab.com

Type: unauthorized

Detail: 213.171.213.201: Invalid response from http://www.westnab.com/.well-known/acme-challenge/02vFLBEZRYEz3TatOZeRZz2nyeXWoeh7eXN1xYcYgtU: 404

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

My web server is (include version): 2.4.38

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

My hosting provider, if applicable, is: Fasthosts.co.uk

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): 1.31.0

Welcome to the community @WestNab

Thanks for the very complete trouble report. Nothing seems obviously wrong so can you show the output of these commands? We can start to unravel what is happening. Thanks

curl -4 https://ifconfig.co

sudo apachectl -t -D DUMP_VHOSTS
2 Likes

$ curl -4 https://ifconfig.co
213.171.213.201

$ sudo apachectl -t -D DUMPVHOSTS
Syntax OK
I wonder if it is anything to do with the hosting service or their implementation of DNS for westnab.com, which I have had a few problems with?

I don't see anything wrong with your DNS. If that was the primary problem the messages would have been very different.

Can you show output of this? You mistyped the command I showed

sudo apachectl -t -D DUMP_VHOSTS

The error says the Let's Encrypt servers are not finding the challenge token. Certbot apache plug-in first makes changes to Apache config and creates this token. It then requests the cert and the LE servers look for it to verify control of your domain. Hope this helps understand the sequence.

2 Likes

Ah, yes, sorry about the typo:
sudo apachectl -t -D DUMP_VHOSTS
VirtualHost configuration:
So it looks like no virtual hosts! I have configured Apache wrongly, I suppose.

Yes, looks like :slight_smile: You just need to create a VirtualHost for http (port 80). You tried Certbot Apache plug-in and it will create the http (port 443) VirtualHost if the challenge is successful.

I think something as minimal as this would work:

<VirtualHost *:80>
        ServerName  westnab.com
        ServerAlias www.westnab.com

        DocumentRoot /var/www/html   # your folder as you prefer

        ##ServerAdmin webmaster@localhost   # as needed

        # logging if/as needed
        #ErrorLog ${APACHE_LOG_DIR}/error.log
        #CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
3 Likes

$ sudo apachectl -t -D DUMO_VHOSTS
*.80 westnab.com (/etc/apache2/sites-enabled/westnab.com.conf:1)
OK, that's better! One of the things I did wrong was to think that I had to configure a https (port 443) virtual host in the westnab.com.conf file, so copied default-ssl.conf to it initially, making everything contained within ... . Then, when I realised I needed http (port 80) configured for Certbot to work, I put the new virtual host inside that section! Foolish.
I went on to see if Certbot would now install certificates. Yes, success.
Thanks a lot for your help, MikeMcQ!

2 Likes

The bit with ... should read IfModule mod_ssl.c ... /IfModule - with pointy brackets - which are (of course) part of the message board syntax and were thus ignored!

1 Like

No worries. You can use a single backtick before and after inline text to retain special chars. Or, use 3 backticks before and after blocks of such text. Just for future reference

3 Likes

That also has a TYPO.

1 Like

OK, thanks.

1 Like

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