2011年3月10日星期四

virtualhosts and listen (Listen to all, handle some)

hello (sorry for my bad english)

in the following example, nginx do bind on all interfaces because exists
a "listen *: 80" right?

OK, so I want to do the following, nginx listens on all interfaces
(localhost, LAN and Internet) but some virtualhost only respond to some
interfaces.

The problem I have is that requests do not process the block server as
it should.

www.site.com respond forbidden 403 on block with server_name phpmyadmin,
why?

I'm doing wrong?

server {
listen *:80 default_server;
server_name _;
return 444;
}

server {
listen 192.168.1.1:80;
server_name phpmyadmin;
}

server {
listen *:80;
server_name www.site.com;
}

server {
listen 127.0.0.1:80;
server_name bots;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,181900,181900#msg-181900


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论