some question about server listen
Igor Sysoev
is at rambler-co.ru
Mon Apr 27 17:56:29 MSD 2009
On Mon, Apr 27, 2009 at 09:50:27AM -0400, zhijianpeng wrote:
> ========my nginx.conf===========
> server {
>
> listen 10.1.1.1:80;
> server_name www.test1.com;
> root /opt/test1;
> }
>
> server {
>
> listen 80;
> server_name www.test2.com;
> root /opt/test2;
> }
>
> ========my nginx.conf===========
> I found that server www.test2.com not listen on 10.1.1.1 ,but only listen on 127.0.0.1,why ?
Probably, you mistook: in this case nginx listen on *:80 only.
If you want to bind() to an address, then you should set
listen 10.1.1.1:80 default bind;
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list