'Failed authorization procedure' on macOS server - Web Root Server Not Correct

Please fill out the fields below so we can help you better.

My domain is:
mail.foe-scotland.org.uk

I ran this command:
sudo letsencrypt certonly --webroot -w /Library/Server/Web/Data/Sites/Default/.well-known/acme-challenge/ -d mail.foe-scotland.org.uk --test-cert --break-my-certs

It produced this output:

`Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cert is due for renewal, auto-renewing…
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for mail.foe-scotland.org.uk
Using the webroot path /Library/Server/Web/Data/Sites/Default/.well-known/acme-challenge for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. mail.foe-scotland.org.uk (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://mail.foe-scotland.org.uk/.well-known/acme-challenge/mWcCG6VamCgLUjmew5AFruF_NVM0FlVhLFw97c3DlN8: "

404 Not Found

Not Found

<p"` ` IMPORTANT NOTES: - The following errors were reported by the server:` ` Domain: mail.foe-scotland.org.uk Type: unauthorized Detail: Invalid response from http://mail.foe-scotland.org.uk/.well-known/acme-challenge/mWcCG6VamCgLUjmew5AFruF_NVM0FlVhLFw97c3DlN8: " 404 Not Found

Not Found

<p" ` ` 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 operating system is (include version):
macOS 10.12.4 / Server 5.3

My web server is (include version):
Apache/2.4.25 (Unix)

My hosting provider, if applicable, is:
n/a

I can login to a root shell on my machine (yes or no, or I don’t know):
yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
no

Ignore me, I think I solved my own problem. :hushed:

I tried again by specifying the proper web root (not the .well-known path), and it all worked.

sudo letsencrypt certonly --webroot -w /Library/Server/Web/Data/Sites/Default/ -d mail.foe-scotland.org.uk --test-cert --break-my-certs

I’m not sure whey I thought I had to specify the path to .well-known/acme-challenge, but that as clearly wrong.

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