I have a redirect in httpd.conf sending all 80 to 443. But I’m pretty sure that’s not the problem. I previously had trouble getting the certs to apply, but discovered that /etc/httpd/conf/httpd.conf was pointing to Apache-generated self-signed certs. I manually changed that and the SSL started working. I think that may be related to why the dry run is failing.
<p", robjvargas.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://robjvargas.com/.well-known/acme-challenge/uHBwpC7Xj4FBmRtzLSFITp2SMMKVa9OwHaf5vDghqGs: "
404 Not Found
Not Found
<p"
So, do I lack permissions somewhere? I thought certbot --apache would take care of that (and it was run as sudo, which may be a clue).
I’m confused. The redirect seems fine insofar as using the CMS that I installed on the site (Joomla). I don’t see that extra slash in any of the URI’s for the site, nor in any of the status messages as the dry run proceeds.
The challenge folder seems not to be there.
sudo ls -lZ /%site root%/.well-known/a*
That yields no such file or directory. I don’t see that directory with the -a switch, either.
Since I’m primarily a Windows guy, I’m checking some newbie sites to make sure I’m not missing something basic. Right now, I wonder if I need to create that directory
Certbot will create .well-known and acme-challenge as necessary; it will delete acme-challenge before exiting (if it’s empty), but it will leave .well-known.
So it’s normal to only have an acme-challenge directory for a few seconds while Certbot is running.
Actually, the .well-known isn’t there, either. I’ll try creating it.
ls -aCF %site root%
./ bin/ error.log info.php* modules/ robots.txt.dist ../ cache/ htaccess.txt language/ plugins/ templates/ LICENSE.txt cli/ images/ layouts/ requests.com tmp/ README.txt components/ includes/ libraries/ requests.log web.config.txt administrator/ configuration.php index.php media/ robots.txt*
Formatting’s a bit off, but I think that gives you the gist.
Hope you don’t mind me obfuscating the site root directory. I know it’s not that hard to guess, but I think you can see that it is the root for the site.
Thanks, @rg305. I think I’ve got the slash issue resolved. Still getting the errors, however. I run the certbot renew (as above) with sudo. But I’m seeing claimed authentication failures:
Same error as in the OP.
That’s a local authorization error, right? Not a Letsencrypt failure?
Yes. In fact, it’s still there, with two lines of plain text.
It was immediately accessible after creating both the .well-known and the acme-challenge folder. I also ran chown apache:apache on the folders as well as chmod 755:
from the site root folder:
[root@www html]# ls -lZ ./.well-known/acme-challenge/
-rwxr-xr-x apache apache ? test.txt
Files in the parent directories have that same question mark. But since the site is running, and since the initial cert succeeded, I haven’t bothered to fix that, if I even need to.
I’m not sure how you’re doing your HTTPS redirection but I think the problem may be somehow related.
You could try excluding the challenge requests from the redirection.
with something (more or less) like this: