Unable to get Letsencrypt certificate for one virtual host

I have 4 virtual hosts on a virtualmin instance. I was able to use the web form to install certificates for 3 of them, but the 4th gives me the following errors:


Requesting a certificate for biz-on-ramp.com from Let’s Encrypt …
… request failed : Web-based validation failed :
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for biz-on-ramp.com
Using the webroot path /home/biz-on-ramp/public_html for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. biz-on-ramp.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://biz-on-ramp.com/.well-known/acme-challenge/6aZ4emgqjsQegfaxYTN_TpmVaqsB15xQ3ZsI3nzvfrc: "

404 Not Found

Not Found

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

Domain: biz-on-ramp.com
Type: unauthorized
Detail: Invalid response from
http://biz-on-ramp.com/.well-known/acme-challenge/6aZ4emgqjsQegfaxYTN_TpmVaqsB15xQ3ZsI3nzvfrc:
"

404 Not Found

Not Found

<p"

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.
DNS-based validation failed :
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for biz-on-ramp.com
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. biz-on-ramp.com (dns-01): urn:acme:error:dns :: DNS problem: NXDOMAIN looking up TXT for _acme-challenge.biz-on-ramp.com
IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: biz-on-ramp.com
    Type: None
    Detail: DNS problem: NXDOMAIN looking up TXT for
    _acme-challenge.biz-on-ramp.com


I have checked the DNS, and everything looks fine. What am I doing wrong?

From the error there is some kind of permission problem. Is the web root for that site owned by the user? Do you have some kind of restriction in a .htaccess file somewhere, or in the config file?

I have tried removing the .htaccess, but there was no change. It is a multisite wordpress install.

Did you find a resolution to this problem?

I kept messing with settings, and it suddenly worked. I still am not sure why.