Nginx assuming all non-specified domains are handled by another vhost

Igor Sysoev is at
Sat Oct 20 12:36:22 MSD 2007

On Sat, Oct 20, 2007 at 01:05:32AM +0100, James Darling wrote:

> I'm not quite sure how to explain my problem, hence a failure to  
> google effectively, so I don't know if this problem is unique or not,  
> or whether it's me or a bug.
> I have many domains, and therefore have many vhosts. One of them is  
>, my personal site. However, any domains that don't have a  
> vhost get sent to the vhost. And if I create a default  
> vhost, I get the following error on start, despite only mentioning  
> the term once.
> nginx2007/10/19 20:57:29 [warn] 16880#0: conflicting server name  
> "" on, ignored
> I think it's best to show you my test config files with just two  
> domains and output directly, so I've outlined my issue in a pastie -  
> please see

If you did not define "server_name" in "server {}", then nginx use
hostname as server_name. It's seems that your hostname is

You may set

    server_name  _ *;

as it was already suggested.
"_" is simple nonexistent domain name.

Igor Sysoev

More information about the nginx mailing list