The letsencrypt error cannot be resolved and the cause is unknown

My domain is: apasn.com

I ran this command: sudo certbot certonly --webroot -w /var/www/letsencypt -d apasn.com

It produced this output:
`Failed authorization procedure. apasn.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://apasn.com/.well-known/acme-challenge/76j3QHOCHA6NckNbS3pKrOVO3rCIdRuTAAeqwTbwDZU [178.128.104.17]: “\r\n404 Not Found\r\n<body bgcolor=“white”>\r\n404 Not Found\r\n


IMPORTANT NOTES:

My web server is (include version): nginx

The operating system my web server runs on is (include version):Ubuntu 18.04.3

My hosting provider, if applicable, is:digitalocean

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):certbot 0.23.0

sudo vi /etc/nginx/sites-available/apasn.com

 location ^~ /.well-known/acme-challenge/ {
            allow all;
            root /var/www/letsencrypt/;
            default_type "text/plain";
            try_files $uri =404;

    }

`
I can’t solve this error.
I have tried various methods, but it is difficult for beginners to understand.
Help me.

Hi @django

is this

really the command you have used?

letsencypt != letsencrypt - missing r.

Your location definition uses letsencrypt.

Thank you very much.
That was a really big help.

1 Like

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