Certbot + Nginx + Centos 6: Failed Authorisation procedure with invalid response

Hello! I'm newly with LE and my centos vps server is already running in production with node.js(+express.js) and nginx as reverse proxy.
Through Certbot I wanted to get LE with my domain following the tutorial on certbot website. And this is the error I keep getting :

_ - The following errors were reported by the server:_

_ Domain: mydomain.com_
_ Type: unauthorized_
_ Detail: Invalid response from_
_ http://mydomain.com/.well-known/acme-challenge/SIz2iP8RZb0JYh5WXv8FVdrb11nMdo1JincpN3y4iXs_
_ [xxx.xxx.xxx]: 404_

_ To fix these errors, please make sure that your domain name was_
_ entered correctly and the DNS A record(s) for that domain_
_ contain(s) the right IP address._

My domain name was entered correctly and the DNS A record contain the right IP address. My domain is online and working fine. Through FTP I can see the /.well-known/ empty.
After some tour online, I've tried to add this location in my nginx.config :
location ~ /.well-known {
allow all;
But still not working.

So please I took time to google so many things but I could not get it right till now.

Please I will welcome any help.

The program removes the file from .well-known/acme-challenge/ after running the attempt, so it will be empty when you look. You should see the time-stamp on the directory match the time you ran the certbot.
For mine, I placed a file ‘.well-known/cat.png’ and then made sure I could reach it from my browser. Then with curl -i http://www.mydomain.com/.well-known/cat.png I could see the http -> https Location: redirect was wrong.

1 Like

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