xin

Directive reference

server_name

Names the virtual hosts handled by a server block.

Syntaxserver_name name ...;
Contextsserver
Defaultserver_name "";

Behavior

Exact names win before wildcard names; regular expressions are checked in configuration order. The Host header is normalized before selection.

Example

server_name example.com www.example.com;

Related directives

listen · location