Acme challenge 404 & new websites redirect to default

SYSTEM INFORMATION
OS type and version CentOS 7.9.2009
Webmin version 1.860

Hi everyone,

I’m trying to request an letsencrypt SSL certificate for a single website using Let’s Encrypt, but I’m encountering the following error:

IMPORTANT NOTES:  
- The following errors were reported by the server:  

  Domain: mydomain.in  
  Type:   unauthorized  
  Detail: 111.222.333.444: Invalid response from  
  http://mydomain.in/.well-known/acme-challenge/sobjt-eofKY5uKh45Gce26v4OOdzlymQFk7jfGz2szU  
  404  

  Domain: mail.mydomain.in  
  Type:   unauthorized  
  Detail: 111.222.333.444: Invalid response from  
  http://mail.mydomain.in/.well-known/acme-challenge/sobjt-eofKY5uKh45Gce26v4OOdzlymQFk7jfGz2szU  
  404  

  Domain: www.mydomain.in  
  Type:   unauthorized  
  Detail: 111.222.333.444: Invalid response from  
  http://www.mydomain.in/.well-known/acme-challenge/sobjt-eofKY5uKh45Gce26v4OOdzlymQFk7jfGz2szU  
  404  

  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’ve checked the URLs, and it seems like the requests are redirected to the default website with HTTPS.

Here’s what I’ve done so far:

  • Verified the DNS configuration using dig, and the URLs are correctly pointed to the server.
  • Checked for a .htaccess file inside the root directory of the website, but there isn’t one.
  • Looked for any redirect rules, but I couldn’t find where this redirection is happening.
  • Tried various configurations to resolve the issue but still no luck.

Does anyone have any advice on how to fix this? Your help would be greatly appreciated!

You need to put a test file in /home/domain/public_html/.well-known and see if you can browse to it. If you can’t, you’ll need to figure out why.

Usually, it’s something in .htaccess redirecting or otherwise sucking up all requests to your domain. You need to always exclude .well-known from any redirects and proxy rules.

Thanks for your reply. I’ve already placed a test file in the .well-known directory, its loading after changing this virtualmin > server configuration > website options Redirect all requests to SSL site & Website matches all sub-domains to yes.
. but ssl request cert is giving Type: unauthorized 404 .Could you provide some guidance on this?

Would force ssl be a issue before getting a cert?

If you set that up in Virtualmin, it will exclude .well-known.

Again, this always comes down to something is redirecting or proxying without excluding .well-known. OP needs to look at their configuration for the VirtualHost and their .htaccess (if any) and find the redirect that isn’t excluding .well-known and fix that problem.

1 Like

Just made this change local ip for * <VirtualHost *:80> … like <VirtualHost 192.168.11.11:80> in webmin > servers > apache server > config and now the letsencrypt cert issued for the website .

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