2011年3月10日星期四

Re: virtualhosts and listen (Listen to all, handle some)

thanks for answering maxim.

then it not makes sense to use *: 80 in this case??

the following is correct?

THANK YOU!

## DEFAULT SERVER FOR ALL NETWORK INTERFACES ##
server {
listen 127.0.0.1:80 default_server;
listen 192.168.1.1:80 default_server;
listen public_ip:80 default_server;

server_name _;
return 444;
}


## HANDLE ONLY LAN ##
server {
listen 192.168.1.1:80;

server_name phpmyadmin;
}

## HANDLE LOCALHOST LAN AND INTERNET##
server {
listen 127.0.0.1:80;
listen 192.168.1.1:80;
listen public_ip:80;

server_name www.site.com;
}

## HANDLE ONLY LOCALHOST##
server {
listen 127.0.0.1:80;

server_name bots;
}

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


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

没有评论:

发表评论