Welcome! Log In Create A New Profile

Advanced

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

March 10, 2011 04:55AM
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;
}
Subject Author Posted

virtualhosts and listen (Listen to all, handle some)

pepejose March 10, 2011 03:38AM

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

pepejose March 10, 2011 04:24AM

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

Maxim Dounin March 10, 2011 04:42AM

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

pepejose March 10, 2011 04:55AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 46
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready