Binding nginx to a single interface

Bai Shen baishen.lists at
Thu Feb 9 18:06:14 UTC 2012

They do.

However, I do have some weird behaviour.  I have the server_name set to and that correctly connects me to my web server.  But if I
type in, that connects me to my web server as well, even though I
don't have a default rule setup.

When I go to I get a "Welcome to nginx!" page.

On Thu, Feb 9, 2012 at 12:54 PM, Maxim Dounin <mdounin at> wrote:

> Hello!
> On Thu, Feb 09, 2012 at 12:42:47PM -0500, Bai Shen wrote:
> > I have two nics on my server.  I have nginx set to listen on one of them
> > using "listen 80"  However, it keeps listening on the other ip
> as
> > well.  So i'm unable to start anything else on port 80 on that interface.
> >
> > Any ideas what could be wrong?  Everything I'm finding says that the
> listen
> > command is all I needed to do.
> Make sure all server{} blocks in your config have the above listen
> explicitly specified.  If server{} block have no listen directives
> at all, nginx will use "listen 80" by default, and this may be a
> culprit.
> Maxim Dounin
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list