Hey folks! I'm encountering what appears to be a relatively common issue with a 403 error when trying to access content in .well-known/acme-challenge - which throws a wrench in Certbot when it attempts to run.
Throwing a test file into a manually-created .well-known/acme-challenge folder and attempting to navigate to it in my browser (i.e. at https://cloud.ryburlingtons.net/.well-known/acme-challenge/test.html) also returns 403 error, but placing this file in the webroot and navigating to it there (i.e. at https://cloud.ryburlingtons.net/test.html) works fine, and all the directories and files starting at the webroot seem to have the same permissioning (View and Access for anyone, Change for www-data).
For context, this is for a Nextcloud instance I've set up on a Raspberry Pi 4 running DietPi. I'm working on setting it up on a subdomain rather than its default /nextcloud URL with the intent of having it run in parallel with some other services on other subdomains. I was actually able to run certbot successfully for ryburlingtons.net prior to attempting to move Nextcloud to the new subdomain.
I suspect there's a .conf or some such that's blocking .well-known, but I'm newish to lighttpd and unsure of where to look.
Thanks in advance!
My domain is:
cloud.ryburlingtons.net (I also control ryburlingtons.net)
I ran this command:
sudo certbot certonly --cert-name ryburlingtons.net -d ryburlingtons.net -d cloud.ryburlingtons.net
(followed by option [2] - webroot, followed by option [1] - update, followed by providing my proper webroot directory for Nextcloud)
It produced this output:
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: cloud.ryburlingtons.net
Type: unauthorized
Detail: 68.237.204.57: Invalid response from http://cloud.ryburlingtons.net/.well-known/acme-challenge/H_AuFLWL660XpxFBUusQdTDNjwlauxEWROc8UWwOw10: 403
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
My web server is (include version):
lighttpd/1.4.69 (ssl)
The operating system my web server runs on is (include version):
DietPi v8.22.3
My hosting provider, if applicable, is:
myself
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):
certbot 2.1.0