SSL - Certbot: 404 / unauthorized

Hello Mike and thanks for your answer

Just to clarify one thing: I used 'my-website' to avoid having this page show up in google results if people look for the website name. I think it'd look rather unprofessional. But Bruce just recommended above to use the 'redacted' mention, which I will do in the future.

I used the tip you provided and I think you put me on the right path.

  • With a abc.txt file in the /var/www/certbot/ folder, I'm able to append /.well-known/acme-challenge/abc.txt to my url and have the text file displayed in the browser. So nginx seems to work properly here

  • However, using curl and the same url, I'm unable to download the file properly. I'm getting a text file with html (the nginx 'not found' page). In the docker logs, I see this:

[03/Mar/2024:15:51:05 +0000] "GET /.well-known/acme-challenge/abc.tx HTTP/1.1" 404 146 "-" "curl/7.68.0" "-"
2024/03/03 15:51:05 [error] 29#29: *17 open() "/var/www/certbot/abc.tx" failed (2: No such file or directory)

Do you maybe have any idea why it would work in one case and not in the other? Thanks

1 Like