From: Sander Temme The The If no
-
-Description: Hostname and port that the server uses to identify
itself
+Syntax: ServerName fully-qualified-domain-name[:port]Syntax: ServerName [scheme://]fully-qualified-domain-name[:port]Context: server config, virtual host Status: Core
@@ -2575,7 +2575,8 @@ itself
directive supersedes the functionality of the Module: core Port
directive from version 1.3.
ServerName directive sets the hostname and
+ ServerName directive sets the
+ request scheme, hostname and
port that the server uses to identify itself. This is used when
creating redirection URLs. For example, if the name of the
machine hosting the web server is simple.example.com,
@@ -2590,11 +2591,10 @@ itself
ServerName is specified, then the
server attempts to deduce the hostname by performing a reverse
lookup on the IP address. If no port is specified in the
- ServerName, then the server will use the port
- from the incoming
- request. For optimal reliability and predictability, you should
- specify an explicit hostname and port using the
- ServerName directive.ServerName, then the server will use the
+ port from the incoming request. For optimal reliability and
+ predictability, you should specify an explicit hostname and port
+ using the ServerName directive.
If you are using name-based virtual hosts,
the ServerName inside a
@@ -2602,14 +2602,25 @@ itself
section specifies what hostname must appear in the request's
Host: header to match this virtual host.
Sometimes, the server runs behind a device that processes SSL,
+ such as a reverse proxy, load balancer or SSL offload
+ appliance. When this is the case, specify the
+ https:// scheme and the port number to which the
+ clients connect in the ServerName directive
+ to make sure that the server generates the correct
+ self-referential URLs.
+
See the description of the
UseCanonicalName and
UseCanonicalPhysicalPortdirectives for
- settings which determine whether self-referential URL's (e.g., by the
+ settings which determine whether self-referential URLs (e.g., by the
mod_dir module) will refer to the
specified port, or to the port number given in the client's request.
The
The simple.example.com,
@@ -2578,11 +2579,10 @@ itself
If no
If you are using name-based virtual hosts,
@@ -2591,13 +2591,24 @@ itself
section specifies what hostname must appear in the request's
Host: header to match this virtual host.
Sometimes, the server runs behind a device that processes SSL,
+ such as a reverse proxy, load balancer or SSL offload
+ appliance. When this is the case, specify the
+ https:// scheme and the port number to which the
+ clients connect in the
See the description of the