.well-known/acme-challenge/ 404

IMPORTANT NOTES:

  • The following errors were reported by the server:

Domain: mail.aboutryansam.com

Type: unauthorized

Detail: Invalid response from

http://mail.aboutryansam.com/.well-known/acme-challenge/03Z4hwQ-BOjFzHnHBHdO2XRitqOVjjcFnBJczMxh954:

"<html>

<head><title>404 Not Found</title></head>

<body bgcolor=“white”>

<center><h1>404 Not Found</h1></center>

<hr><center>"

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.

I ran the command$ sudo certbot --nginx
I have an A and an AAAA recored for that domain. Also I don’t know why it’s looking for /.well-known/acme-challenge/. My the dir is /var/www/nginx/mail.aboutryansam.com/ the only file I have in their is index.html. I’ve used certbot before and I’ve never had problems like this. The only difference is on my apache server I have a reverse proxy that directs traffic from mail.aboutryansam.com to the nginx service running on port 81.

So the reverse proxy is listening on port 80? If so, try this:

sudo certbot --nginx --http-01-port 81

That tells certbot to configure nginx to answer the challenge on port 81, rather than the default port 80. The CA will still connect to port 80, but if you're proxying that to port 81, it should still work.

Thank you! You’re a genius. Is there documentation on this somewhere?

There is, but perhaps not in the most obvious place - it’s in the “testing” section of certbot’s help. I guess those options were originally meant for testing against private instances of Boulder, but they’re also useful for situations like yours involving reverse proxies and such.

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