Certbot - Cannot Pass HTTP-01 Challenge

Hi all, I have a problem can not solve, when I make the request I always get this error, can you help me?

The folder /.well-known is created but not /acme-challenge and cDP3eS4kM5CHy1LKSi6IIYU-6Xh927TUWFjvdXV0GPM

[root@… ~]# sudo certbot --email info@mysite.com --agree-tos certonly --webroot -w /var/www/vhosts/mysite.com -d www.mysite.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.mysite.com
Using the webroot path /var/www/vhosts/mysite.com for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Unable to clean up challenge directory /var/www/vhosts/mysite.com/.well-known/acme-challenge
Failed authorization procedure. www.mysite.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.mysite.com/.well-known/acme-challenge/cDP3eS4kM5CHy1LKSi6IIYU-6Xh927TUWFjvdXV0GPM: " <!–[if IE 7]><html class=“n”


The challenge is deleted after an attempt, therefore you can’t find it any longer after certbot has quit.

Question: is the webroot correct? For example, if you place a test file in it, like /var/www/vhosts/mysite.com/testfile, can you access it through http://mysite.com/testfile?

Thanks for reply!!,
If I insert a file test in the path that you indicated i can not access…only if I insert the file in the path
I can access on file from the path mysite.com/testfile

You've answered your problem right here :wink: Change the webroot path accordingly and it should work.

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