]> granicus.if.org Git - apache/commitdiff
Change httpd.conf default UseCanonicalName to off to make the server
authorJoshua Slive <slive@apache.org>
Wed, 13 Feb 2002 19:58:21 +0000 (19:58 +0000)
committerJoshua Slive <slive@apache.org>
Wed, 13 Feb 2002 19:58:21 +0000 (19:58 +0000)
more idiot proof.

Also, move UseCanonicalName to directly under ServerName to make the
connection clearer, and clean up the comments.

I removed the http://123.123.123.231/ example, because it just makes it
too tempting for people to use
ServerName http://123.23.23.23/

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93396 13f79535-47bb-0310-9956-ffa450edef68

docs/conf/httpd-nw.conf
docs/conf/httpd-std.conf
docs/conf/httpd-win.conf

index 57daa9afdf71a8d82bd17e6eb9c7fc2c24c8ad95..ccc6a8f1ab6a79ade829c41c547aa15dc5a7ecdb 100644 (file)
@@ -178,22 +178,27 @@ Listen @@Port@@
 ServerAdmin @@ServerAdmin@@
 
 #
-# ServerName allows you to set a host name which is sent back to clients for
-# your server if it's different than the one the program would get (i.e., use
-# "www" instead of the host's real name).
+# ServerName gives the name and port that the server uses to identify itself.
+# This can often be determined automatically, but we recommend you specify
+# it explicitly to prevent problems during startup.
 #
-# 127.0.0.1 is the TCP/IP local loop-back address. Your machine
-# always knows itself by this address. If you machine is connected to
-# a network, you should change this to be your machine's name
+# If this is not set to valid DNS name for your host, server-generated
+# redirections will not work.  See also the UseCanonicalName directive.
 #
-# Note: You cannot just invent host names and hope they work. The name you 
-# define here must be a valid DNS name for your host. If you don't understand
-# this, ask your network administrator.
 # If your host doesn't have a registered DNS name, enter its IP address here.
-# You will have to access it by its address (e.g., http://123.45.67.89/)
-# anyway, and this will make redirections work in a sensible way.
+# You will have to access it by its address anyway, and this will make 
+# redirections work in a sensible way.
 #
-ServerName @@ServerName@@
+#ServerName new.host.name:80
+
+#
+# UseCanonicalName: Determines how Apache constructs self-referencing 
+# URLs and the SERVER_NAME and SERVER_PORT variables.
+# When set "Off", Apache will use the Hostname and Port supplied
+# by the client.  When set "On", Apache will use the value of the
+# ServerName directive.
+#
+UseCanonicalName Off
 
 #
 # DocumentRoot: The directory out of which you will serve your
@@ -314,16 +319,6 @@ AccessFileName .htaccess
     Deny from all
 </Files>
 
-#
-# UseCanonicalName:  With this setting turned on, whenever Apache needs 
-# to construct a self-referencing URL (a URL that refers back to the 
-# server the response is coming from) it will use ServerName to form
-# a "canonical" name.  With this setting off, Apache will use the 
-# hostname:port that the client supplied, when possible.  This also 
-# affects SERVER_NAME and SERVER_PORT in CGI scripts.
-#
-UseCanonicalName On
-
 #
 # TypesConfig describes where the mime.types file (or equivalent) is
 # to be found.
index 805ace4841a53d73108483c736d471723f43cdd9..6533dcb6194617a503b9642005f3ce927b701dcc 100644 (file)
@@ -269,11 +269,20 @@ ServerAdmin you@your.address
 # redirections will not work.  See also the UseCanonicalName directive.
 #
 # If your host doesn't have a registered DNS name, enter its IP address here.
-# You will have to access it by its address (e.g., http://123.45.67.89/)
-# anyway, and this will make redirections work in a sensible way.
+# You will have to access it by its address anyway, and this will make 
+# redirections work in a sensible way.
 #
 #ServerName new.host.name:80
 
+#
+# UseCanonicalName: Determines how Apache constructs self-referencing 
+# URLs and the SERVER_NAME and SERVER_PORT variables.
+# When set "Off", Apache will use the Hostname and Port supplied
+# by the client.  When set "On", Apache will use the value of the
+# ServerName directive.
+#
+UseCanonicalName Off
+
 #
 # DocumentRoot: The directory out of which you will serve your
 # documents. By default, all requests are taken from this directory, but
@@ -383,16 +392,6 @@ AccessFileName .htaccess
     Deny from all
 </Files>
 
-#
-# UseCanonicalName:  With this setting turned on, whenever Apache needs 
-# to construct a self-referencing URL (a URL that refers back to the 
-# server the response is coming from) it will use ServerName to form
-# a "canonical" name.  With this setting off, Apache will use the 
-# hostname:port that the client supplied, when possible.  This also 
-# affects SERVER_NAME and SERVER_PORT in CGI scripts.
-#
-UseCanonicalName On
-
 #
 # TypesConfig describes where the mime.types file (or equivalent) is
 # to be found.
index 7417063ebf8cc5d9a2d56f6dd6dbbd864f2a48f4..c1b93fe773af358b4536aa6ea61357849c7d781c 100644 (file)
@@ -204,11 +204,20 @@ ServerAdmin @@ServerAdmin@@
 # redirections will not work.  See also the UseCanonicalName directive.
 #
 # If your host doesn't have a registered DNS name, enter its IP address here.
-# You will have to access it by its address (e.g., http://123.45.67.89/)
-# anyway, and this will make redirections work in a sensible way.
+# You will have to access it by its address anyway, and this will make 
+# redirections work in a sensible way.
 #
 ServerName @@ServerName@@:@@Port@@
 
+#
+# UseCanonicalName: Determines how Apache constructs self-referencing 
+# URLs and the SERVER_NAME and SERVER_PORT variables.
+# When set "Off", Apache will use the Hostname and Port supplied
+# by the client.  When set "On", Apache will use the value of the
+# ServerName directive.
+#
+UseCanonicalName Off
+
 #
 # DocumentRoot: The directory out of which you will serve your
 # documents. By default, all requests are taken from this directory, but
@@ -323,16 +332,6 @@ AccessFileName .htaccess
     Deny from all
 </Files>
 
-#
-# UseCanonicalName:  With this setting turned on, whenever Apache needs 
-# to construct a self-referencing URL (a URL that refers back to the 
-# server the response is coming from) it will use ServerName to form
-# a "canonical" name.  With this setting off, Apache will use the 
-# hostname:port that the client supplied, when possible.  This also 
-# affects SERVER_NAME and SERVER_PORT in CGI scripts.
-#
-UseCanonicalName On
-
 #
 # TypesConfig describes where the mime.types file (or equivalent) is
 # to be found.