virtualhosts and listen (Listen to all, handle some)
pepejose
nginx-forum at nginx.us
Thu Mar 10 11:38:28 MSK 2011
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
More information about the nginx
mailing list