nginx on multi ip address

adam sun lists at ruby-forum.com
Tue Dec 11 11:54:06 UTC 2012


My webserver has two ip(192.168.0.10 and 200.12.12.10).
And I have many hosts running on these ip.

most of them configured like this:

server {
      server_name server1;
      listen 80;
};

server {
      server_name server2;
      listen 80;
};

#........

Then I would like to make "server1" only listen to internal ip
address(192.168.0.10).
And I changed the server1 conf to
server {
      server_name server1;
      listen 192.168.0.10:80;
};

and keep everything else as before.

Now I got problem.
When I visit  server2 using ip 192.168.0.10, the server will give me
response of server1.


Is there anyway to resolve this?

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list