Certbot Invalid response from

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: fabrykacraft.pl

I ran this command: sudo certbot --nginx -d fabrykacraft.pl

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for fabrykacraft.pl
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "react.fabrykacraft.pl" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
Waiting for verification...
Challenge failed for domain fabrykacraft.pl
http-01 challenge for fabrykacraft.pl
Cleaning up challenges
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "react.fabrykacraft.pl" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
Some challenges have failed.

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

   Domain: fabrykacraft.pl
   Type:   unauthorized
   Detail: Invalid response from
   http://fabrykacraft.pl/.well-known/acme-challenge/LGCaZ5iNRMy4PTjIXtWr-anQ2PPwAi5DEQXuuMc9TTc
   [130.162.41.175]: "<html>\r\n<head><title>404 Not
   Found</title></head>\r\n<body>\r\n<center><h1>404 Not
   Found</h1></center>\r\n<hr><center>nginx</center>\r\n"

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address.

My web server is (include version): Nginx 1.18.0 / Next.js 12.1 (Address has proxy to NextJS via Nginx)

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

My hosting provider, if applicable, is: Oracle (VM ARM Instance)

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): 0.40.0

I've made sure to check the A record in DNS, but it's all properly since it's possible to connect now. There wasn't any problem with renewing all of the other subdomains that point to the same IP.

EDIT:
Here's the output of nginx -t:

root@yeetcraft-serwer:/etc/nginx/sites-enabled# nginx -t
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "react.fabrykacraft.pl" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "fabrykacraft.pl" on 0.0.0.0:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@yeetcraft-serwer:/etc/nginx/sites-enabled#

Show us the output of

sudo nginx -T

and put it between backticks

```
Like this
```
2 Likes

I've fixed it!

I still had files ending with .save in sites-enabled folder of nginx. Removing them stopped the issue!

1 Like

A good reason to modify the default include statement to end with: *.conf

2 Likes

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