Ubuntu 20.04 TLS acme-challenge failed

Hey guys! I'm running into this issue since yesterday. Could you please help me resolve this please?

My domain is: smadspy.com

I ran this command: certonly --webroot --webroot-path=/var/www/html --dry-run --email myemail@domain.com --agree-tos --no-eff-email -d smadspy.com

It produced this output:

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: smadspy.com
Type: unauthorized
Detail: Invalid response from http://smadspy.com/.well-known/acme-challenge/-lLvY6wkHznQ5DXVF1sc7oMgcclYzZ4TTDzbh1Jtjl4 [server ip address]: "\r\n404 Not Found\r\n\r\n

404 Not Found

\r\n
nginx/1.18.0 (Ub"

My web server is (include version): nginx 1.18.0

The operating system my web server runs on is (include version): Ubuntu 20.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

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

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

Thank you so much for your help!

Is the webroot path /var/www/html correct? It should correspond with the root of the corresponding vhost in nginx.

4 Likes

Typo. Should be root value in corresponding virtual server
there is no server_root setting in nginx.

3 Likes

I just changed it to /usr/share/nginx/html I just found out after running the nginx -V commend that the -prefix root was /usr/share/nginx/

I then tried to run certonly --webroot --webroot-path=/usr/share/nginx/html --dry-run --email myemail@domain.com --agree-tos --no-eff-email -d smadspy.com

And unfortunately, same results...

(Buy the way, I'm trying to deploy my website using docker)

Hm, probably confused with server_name :blush:

In that case it's probably wise to also include the Docker configuration files (or how those things are called anyway) in your post(s).

That also means I'm probably not able to help you, but maybe someone else with more Docker experience here on the Community can :slight_smile:

2 Likes

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