Certbot authentication failure 403 forbidden

My domain is: deweger.net

I ran this command: certbot --apache -d deweger.net

It produced this output:
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: deweger.net
Type: unauthorized
Detail: Invalid response from http://deweger.net/.well-known/acme-challenge/ydQIdn--NPKFMlblAJbPNYJ6t3lTBV-Zzmmp0yicz9Q [83.162.203.108]: "\n\n403 Forbidden\n\n

Forbidden

\n<p"

My web server is (include version): Apache/2.4.38 (Raspbian)

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

My hosting provider, if applicable, is: n/a

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.18.0

Under the webroot I created .well-known/acme-challenge/1234 which is visible from the internet.

Could this error be caused by the fact that there still is a valid letsencrypt certificate for the same domain on another server that I just switched offline? If so, how to solve this?

Grtz,
Benne

Nope! That wouldn't cause a problem.

That the error is a 403 rather than a 404 might be a hint as to what's wrong.

What is the output of:

sudo apachectl -t -D DUMP_VHOSTS

and also

sudo grep cz9Q /var/log/apache2/error.log

Thanks for your help. I had removed the 000-default.conf, putting it back in place (with proper content) and setting a global ServerName has solved the issue.

Grtz,
Benne

1 Like

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