nginx: [warn] conflicting server name ““ on, ignored

When implementing nginx redirection, the following warning appears:

[root@lnmp1 conf]# nginx -s reload
nginx: [warn] conflicting server name "" on, ignored

reason: This domain name appears twice or even many times, resolving the same domain name to different directories. Generally, this error occurs when the configuration file is separated separately.

If you bind server name repeatedly, a warning will appear. However, this warning will not affect the operation of the server
moreover, this duplicate binding means that the nginx service running now is duplicate with the nginx service in the new configuration to be loaded. Therefore, this warning is unnecessary.

In the configuration file, the statement that also uses the domain name is annotated. If the domain name is loaded smoothly again, no warning will appear

Read More: