Failed authorization procedure VPS Ubuntu 16.04

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

My domain is: www.maet.bg

I ran this command: sudo certbot certonly --webroot --webroot-path=/var/www/html -d maet.com -d www.maet.com

It produced this output:

Failed authorization procedure. www.maet.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.maet.com/.well-known/acme-challenge/vrbYZ1aRkuR8juUcjKAyblfj2ZhAh4MufTEmvuHYPpQ: "<!DOCTYPE html>
    <html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
             
    
    <meta charset="u", maet.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://maet.com/.well-known/acme-challenge/RNZY2vc2XNVW4I-guJRUoMe0bLxuQlBHCRcQHOuIMOg: "<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
             
    
    <meta charset="u"

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

   Domain: www.maet.com
   Type:   unauthorized
   Detail: Invalid response from
   http://www.maet.com/.well-known/acme-challenge/vrbYZ1aRkuR8juUcjKAyblfj2ZhAh4MufTEmvuHYPpQ:
   "<!DOCTYPE html>
   <html>
   <head>
       <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>


       <meta charset="u"

   Domain: maet.com
   Type:   unauthorized
   Detail: Invalid response from
   http://maet.com/.well-known/acme-challenge/RNZY2vc2XNVW4I-guJRUoMe0bLxuQlBHCRcQHOuIMOg:
   "<!DOCTYPE html>
   <html>
   <head>
       <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>


       <meta charset="u"

   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 web server is (include version): nginx/1.10.3 (Ubuntu)

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

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

If I try the url http://www.maet.com/.well-known/acme-challenge/vrbYZ1aRkuR8juUcjKAyblfj2ZhAh4MufTEmvuHYPpQ it opens a completely different website.
What am I missing here?

if your domain is www.maet. bg why would you run this command with param -d
sudo certbot certonly --webroot --webroot-path=/var/www/html -d maet. com -d www.maet. com` ?

And not
sudo certbot certonly --webroot --webroot-path=/var/www/html -d maet. bg -d www.maet. bg` ?

1 Like

what is your acutal domain? you have maet.bg but are issuing certificates for maet.com

You also seem to have some kinds of redirects for maet.com (type it in a browser)

Andrei

I have overlooked it, thank you! Now when I run with the correct domain I still don’t get authorized. However, I am running a django application and the url doesn’t exist on the server and I get 404. Can I give full permission to the command and reach it?

It’s www.maet.bg thank you for pointing that out!

hi @Premitium

You have port 80 open so the webroot challenge makes the most sense

Review the command syntax here: https://certbot.eff.org/docs/using.html#webroot

Essentially you need to give certbot the path of your Django apps www root. It will create a file that should prove that you own the domain.

Andrei

For “bath”, read “path”.

As @ahaw021 says, probably the web root path you’re specifying with -d is not correct. What directory would you put files into in order for them to appear at the top level of your web site?

Thank you guys so what did I do. I used the root folder for nginx /var/www/html created a .well-known folder inside it. And run the command sudo certbot certonly --webroot --webroot-path=/var/www/html/ -d maet.bg -d www.maet.bg

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