LetsEncrypt SSL - Error

I’m running

  • Ubuntu 18.04
  • Virtualmin 6.09.gpl
  • Apache 2.4.29
  • Webmin 1.942

I’ve added a new Virtual Server - only enabling

  • Apache Website
  • Apache SSL Website

Uploaded the content (static) into public_html and it is viewable. HTTPS gives the usual complaint about an untrusted cert (self signed out of the box).

Selecting the Virtual Server in Virtualmin and going to Server Configuration >> SSL Certificate - the Current Certificate tab confirms it’s a self signed one. Going to the Let’s Encrypt tab and clicking the Request Certificate button, leaving everything default (it says it’s requesting a cert for www.myDomain.com & myDomain.com) I get the following error:

Requesting a certificate for myDomain.com, myDomain.com from Let’s Encrypt …
… request failed : Web-based validation failed : Failed to request certificate :
Traceback (most recent call last):
File “/usr/share/webmin/webmin/acme_tiny.py”, line 198, in
File “/usr/share/webmin/webmin/acme_tiny.py”, line 194, in main
signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact)
File “/usr/share/webmin/webmin/acme_tiny.py”, line 143, in get_crt
raise ValueError(“Wrote file to {0}, but couldn’t download {1}: {2}”.format(wellknown_path, wellknown_url, e))
ValueError: Wrote file to /home/myDomain/public_html/.well-known/acme-challenge/Rrn05Lgbli6nKn-1rYa6Zq9hBJMkVGx8KMK5fqQLnqo, but couldn’t download http://myDomain.com/.well-known/acme-challenge/Rrn05Lgbli6nKn-1rYa6Zq9hBJMkVGx8KMK5fqQLnqo: Error:
Url: http://myDomain.com/.well-known/acme-challenge/Rrn05Lgbli6nKn-1rYa6Zq9hBJMkVGx8KMK5fqQLnqo
Data: None
Response Code: 404

404 Not Found

Not Found

The requested URL was not found on this server.

If I browse to http://myDomain.com/.well-known/acme-challenge/Rrn05Lgbli6nKn-1rYa6Zq9hBJMkVGx8KMK5fqQLnqo there is nothing there.

I did set Yes for Redirect HTTP to HTTPS Server Configfuration >> Website Options. Setting it back to No - still got the same error.

I created the file manually and the cert request succeeded. But I don’t want to be creating this file manually for the other Virtual Servers.

Anyone any thoughts\suggestions?

Thanks in advance


Hi Dibs - this may not your issue, but I remember seeing something like this when dns servers where not yet resolved. If you haven’t done so already, perhaps check https://dnschecker.org/ to see if the dns is populated in your part of the world. If you see it resolved, you can try the Let’s Encrypt again and it should work.

@rkan - appreciate the reply. In all fairness, I am moving sites from one host (vps) to another and did change the external DNS records beforehand. I also check on one of the DNS propagation websites and everything looked OK.

I’m moving another site now - but did the DNS changes as soon as I could. If I get the same error - I might leave it a few hours and see what happens.



Just in case: In .. request failed : Web-based validation failed : Failed to request certificate , I mentioned 2 situations in which I had that kind of error and how they were fixed in my case. I don’t think it’s your own case, but hey, it can’t hurt to mention it.

@OliverF - Thanks for the reply. On moving the 2nd site\domain\Virtual Server, I left it a little longer.

Did the noddy stuff - created the VS (http only), placed a test html file there, viried it worked, placed the content in public_html, verified it displayed, then enabled SSL, tested it (expecting the self signed issue) and then hit the button for a LE SSL cert and lo and behold - no error.

I think @rkan was right - DNS propagation might have been the underlying cause (even tho a few sites to check it were showing OK, but without knowing what DNS servers LE use - hard to know).

Thanks guys!


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