Invalid response from ... 404 Not Found

Apologies but I tried following other similar topics with no success: - very new to Ubuntu/lets encrypt

running command:
sudo letsencrypt certonly -a webroot --webroot-path=/var/www/csda -d csda.co.za -d www.csda.co.za

server: Ubuntu 16.04 / NGINX

domains are active and working:

Is it possible I don't have the correct rights? Gave my user -aG sudo access. But unable to create directories under this user.

Error stack:

Failed authorization procedure. csda.co.za (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://csda.co.za/.well-known/acme-challenge/1KHcWbGAA_jIkfpYJc08ytwKbq6jh94eENK-rXwL4AM: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>", www.csda.co.za (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.csda.co.za/.well-known/acme-challenge/4QsrxRbj1U9wmuT1FXhpMYTxlbE5GZ8k9XHfnjOp8n4: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"

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

   Domain: csda.co.za
   Type:   unauthorized
   Detail: Invalid response from http://csda.co.za/.well-known/acme-
   challenge/1KHcWbGAA_jIkfpYJc08ytwKbq6jh94eENK-rXwL4AM: "<html>
   <head><title>404 Not Found</title></head>
   <body bgcolor="white">
   <center><h1>404 Not Found</h1></center>
   <hr><center>"

   Domain: www.csda.co.za
   Type:   unauthorized
   Detail: Invalid response from http://www.csda.co.za/.well-known
   /acme-challenge/4QsrxRbj1U9wmuT1FXhpMYTxlbE5GZ8k9XHfnjOp8n4:
   "<html>
   <head><title>404 Not Found</title></head>
   <body bgcolor="white">
   <center><h1>404 Not Found</h1></center>
   <hr><center>"

   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.

I gave my user the following right but still not working

sudo chown -R anton:anton /var/www

Can you put a test text file containing a simple word in /var/www/csda/.well-known/acme-challenge and try to access it by surfing to it?

For example:

echo "It works!" > /var/www/csda/.well-known/acme-challenge/test

and surf to http://csda.co.za/.well-known/acme-challenge/test

2 Likes

Thanks Osiris, that was rather dumb of me. I’m using ASP.Net Core so there is something else that is disallowing that location.

I’ll figure it out from here…

1 Like

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