Httpd ServerName

From NovaOrdis Knowledge Base
Revision as of 04:55, 6 January 2016 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

Internal

Overview

ServerName specifies the name and port that the server uses to identify itself. This can often be determined automatically, but it is recommended to be specified explicitly in the configuration file to prevent problems during startup.

If the host does not have a registered DNS name, use the IP address here.

ServerName is also used to configure <VirtualHosts>. It is best to always explicitly list a ServerName in every name-based virtual host. If a <VirtualHosts> doesn't specify a ServerName, a server name will be inherited from the base server configuration. If no server name was specified globally, one is detected at startup through reverse DNS resolution of the first listening address. In either case, this inherited server name will influence name-based virtual host resolution, so it is best to always explicitly list a ServerName in every name-based virtual host.