Nginx reload error after last update


#1

After the last nginx update I’m getting an error : service nginx reload failed.

When I check conf files I get this:

nginx -t nginx: [warn] conflicting server name “” 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

So I can’t find where the problem is, I’ve check all conf files of all sites enabled and nothing has been changed since.

Any idea?


#2

Have you added a redirection from http to https somewhere ? Because your nginx error mean you have two server names listening on the port 80.


#3

Normally nginx -t give me an indication from where the duplicate entry come from, like:

nginx: [warn] conflicting server name "hello-studio.com" on 0.0.0.0:80, ignored 

So I can identify from which site conf the duplicate entry comes from. But this warning has an empty server_name “” so I can’t solve the issue.

Do you have any idea how to locate the conf file originating the warning?


#4

Please, someone could help me!? I really can’t find where the problem is, sudo nginx -t gives me nothing more than:

nginx: [warn] conflicting server name "" 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

Is it possible the origin was the renew of all Letsencrypt certificates?


#5

Come on, dude.

Is this really a problem?

It it is not causing any harm, don’t worry.

If you really want to find where the error is, disable all your domains, and reenable one by one, testing on every step; then you perhaps find something new.


#6

Hey. I’ve just had the same problem. Nginx reload failed, however service nginx restart worked

I rebooted my server, and the problem disappeared.


#7

That’s because when you update Nginx the binary executable file changes; the reload action does not work because what is running in memory is not the same in the hard disk.

I’m not sure if a restart is enough.

I always do, after Nginx update:

killall -9 nginx
service nginx start

Then it is not necessary to reboot the entire server.


#8