The virtual server section
Any context beginning with the keyword server
is considered a virtual server section. It describes a logical separation of a set of resources that will be delivered under a different server_name
directive. These virtual servers respond to the HTTP requests, and are contained within the http
section.
A virtual server is defined by a combination of the listen
and server_name
directives. The listen
directive defines an IP address/port combination or path to a UNIX-domain socket:
listen address[:port]; listen port; listen unix:path;
The listen
directive uniquely identifies a socket binding under NGINX. There are a number of optional parameters that listen
can take:
The listen parameters |
Explanation |
Comments |
---|---|---|
|
This parameter defines this address/port combination as being the default value for the requests bound here. | |
|
This parameter sets the corresponding FIB for the listening socket. |
This parameter is only supported on FreeBSD and... |