I have been banging my head against the wall for the last couple of days trying to renew the certificates for my websites. However, I keep hitting the same error where it simply returns a 404 when trying to to an acme challenge. I have read through article upon article, Stackoverflow question upon Stackoverflow question, and nothing has worked. Hence, why I am asking for help here.
When I originally got the certificates I was using Cloudflare, however, due to some issues I was having with my website being blocked for using the Cloudflare proxies I decided to go back to using the normal DNS servers that were provided by enwau.wales (the place I got my domain from). I don't know if this has anything to do with the matter as I am not an expert in this type of stuff.
Then comes the question, does anyone have any ideas how to resolve this issue? If there is any more information I can provide then please let me know.
Some websites with information about the domain:
A bunch of information:
My domain is: prv.cymru
I ran this command:
sudo letsencrypt --apache
But certbot --apache
, and other commands return the same error message.
It produced this output:
[pi@prv.cymru] ~/w/html ✓(master) > sudo letsencrypt --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: prv.cymru
...
12: www.prv.cymru
...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for prv.cymru
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. prv.cymru (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://prv.cymru/.well-known/acme-challenge/3S8vPPnfB6MlbfH9GxPl3LNjHOcIeUqj4rDR78qkgYw [51.174.25.98]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: prv.cymru
Type: unauthorized
Detail: Invalid response from
http://prv.cymru/.well-known/acme-challenge/3S8vPPnfB6MlbfH9GxPl3LNjHOcIeUqj4rDR78qkgYw
[51.174.25.98]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version): apache2
Server version: Apache/2.4.38 (Raspbian)
Server built: 2021-09-30T03:50:49
The operating system my web server runs on is (include version):
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
My hosting provider, if applicable, is: I don't use a hosting provider.
I can login to a root shell on my machine (yes or no, or I don't know): Yes I can log in as root / use sudo.
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No I am not.
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 0.31.0
And the content of the config file for the site (prv.cymru.conf)
(I removed the https part in hopes that certbot would readd it)
<VirtualHost *:80>
ServerName prv.cymru
ServerAlias www.prv.cymru
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
The directory /var/www/html is a symlink to a different folder, but Certbot should have all the privileges it need in that directory.