nginx on multi ip address

Francis Daly francis at
Tue Dec 11 12:13:41 UTC 2012

On Tue, Dec 11, 2012 at 12:54:06PM +0100, adam sun wrote:

Hi there,

> When I visit  server2 using ip, the server will give me
> response of server1.

> Is there anyway to resolve this?

Probably simplest is to list all of the desired listen addresses in each
server{} block.

(I don't know if there's a sensible way to have server1 just reject
any incoming requests to the "wrong" addresses -- if so, that might be
an alternative.)

Francis Daly        francis at

More information about the nginx mailing list