添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
自信的小狗  ·  Power BI可视化 | ...·  2 年前    · 
豪气的青蛙  ·  Fastjson vs Jackson, ...·  2 年前    · 

Question

Conflicting server name "mydomain.com" on 0.0.0.0:80, ignored NGINX error log Ubuntu 20.04

  • Posted on October 12, 2020
  • Nginx
  • hcmendez Asked by Henry Mendez

Hello, when I check the nginx error log I notice that alert and I don’t know why, I cannot access my website from http or https, my DNS in cloudflare are:

A - mydomain.com - MY IP
CNAME - www - mydomain.com

The 4 last lines of the log:

2020/10/12 07:03:22 [notice] 15705#15705: signal process started
2020/10/12 07:18:50 [warn] 15818#15818: conflicting server name "mydomain.com" on 0.0.0.0:80, ignored
2020/10/12 07:18:50 [warn] 15818#15818: conflicting server name "www.mydomain.com" on 0.0.0.0:80, ignored
2020/10/12 07:54:16 [notice] 16047#16047: signal process started

Any help please?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi there @hcmendez ,

It most likely means that you have your mydomain.com domain specified in multiple Nginx server blocks.

What you could do is use the grep command and search for the mydomain.com domain inside your /etc/nginx/sites-enabled folder:

  1. grep -r mydomain.com /etc/nginx/sites-enabled

    If you see the domain name in more than server blocks for port 80, you would need to remove the duplicate one and then restart Nginx.

    Hope that this helps! Regards, Bobby

Solution:

Deploying a MarketPlace LEMP install will create a file: …etc/nginx/sites-available/digitalocean

This file will generate a block as subdomains are added to the droplet. Thus you get two blocks registered, thus the error. You could delete the block in this file, or as it says in the file itself:

# Generally, you will want to move this file somewhere, and start with a clean file but keep this around for reference. Or just disable in sites-enabled.

I also had this problem. In setting up the information to password-protect a directory, I was following a couple different tutorials and really messed things up. I eventually got it working, but still had multiple server blocks and got the warnings. So, my advice to other users is to understand how nginx configuration files work :)

I had a server block in /etc/nginx/sites-available/example.com and also one in /etc/nginx/nginx.conf – In addition, I’d also these lines in nginx.conf:

Virtual Host Configs