Failed authorization procedure Certbot with Nginx on Digital Ocean Dropplet

My domain is: dataanalyst.gr

I ran this command:
sudo certbod --nginx -d dataanalyst.gr -d www.dataanalyst.gr

It produced this output:
https://pastebin.com/ZcELLJFs
My web server is (include version): nginx/1.14.0 (Ubuntu)

The operating system my web server runs on is: Ubuntu 18.04

My hosting provider, if applicable, is: Digital Ocean

I can login to a root shell on my machine: Yes

I’m using a control panel to manage my site: No

The version of my client is: certbot 0.31.0

You should correct this:

nginx: [warn] conflicting server name "dataanalyst.gr" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.dataanalyst.gr" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "dataanalyst.gr" on [::]:80, ignored
nginx: [warn] conflicting server name "www.dataanalyst.gr" on [::]:80, ignored
1 Like

Hi @DataanalystG

if you have such warnings

nginx: [warn] conflicting server name

you have to fix these.

1 Like

Maybe it is a silly question, but it is not obvious to me how I correct this. Could you please provide some further info on how?

You should read the config files in /etc/nginx/sites-enabled and see how many server blocks there are, and what are the listen and server_name directives for each of them.

Inside the /ect/nginx/sites-enabled there are two files, the dataanalyst.gr and the default. Both listening to the same ports and both having server_name dataanalyst.gr www.dataanalyst.gr;.

are they different in other ways?

you can only have one server block per port+server_name combination. so, one has to go.

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