Score:0

What is the IP address value in the listen field?

in flag

I'm looking at an example from here: http://nginx.org/en/docs/http/request_processing.html

The listen value is the IP and port. Does this refer to the IP address of the client or the IP address of the target server? If its the later, then does this mean that 1 machine can have more than 1 IP?

server {
    listen      192.168.1.1:80;
    server_name example.org www.example.org;
    ...
}

server {
    listen      192.168.1.1:80;
    server_name example.net www.example.net;
    ...
}

server {
    listen      192.168.1.2:80;
    server_name example.com www.example.com;
    ...
}
br flag
It's server's IP address. Server could (and usually have) more than one IP address. At least it's external IP (e.g. 192.168.1.1) and local IP (127.0.0.1). But it is not unusual to have more IPs.
Score:1
in flag
HUB

This sets the interface to listen on.

If your machine has more than one interface (or several IP-addresses on single interface), Nginx is able to listen only on selected interfaces.

cassepipe avatar
tg flag
If as I understand an interface is a unique ip/port pair, what do you mean by "several IP-adresses on a single interface" ? Did you mean several ip adresses on a single port ?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.