From: Ruediger Pluem Date: Mon, 24 Jul 2006 13:34:19 +0000 (+0000) Subject: Merge r399947, r406697 from trunk: X-Git-Tag: 2.2.3~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=855ef76388969cc649067682b391afe0789ac73a;p=thirdparty%2Fapache%2Fhttpd.git Merge r399947, r406697 from trunk: * Add optional 'scheme://' prefix to ServerName directive. For 'https', mod_http returns "https" for the ap_hook_http_scheme and DEFAULT_HTTPS_PORT for ap_hook_default_port. This fixes Redirect responses to requests for directories without a trailing slash when httpd runs behind a proxy or offload device that processes SSL. It also enables support for Subversion in that configuration. This change is completely backwards compatible and passes the perl-framework. Minor mmn bump because I add a field to server_rec. * Document r399947, addition of optional scheme:// to ServerName directive PR: 33398 Submitted by: sctemme Reviewed by: sctemme, rpluem, wrowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@425051 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4839514ce94..16dd45bc544 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,14 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.3 + *) Add optional 'scheme://' prefix to ServerName directive, + allowing correct determination of the canonical server URL + for use behind a proxy or offload device handling SSL; fixing + redirect generation in those cases. PR 33398. [Sander Temme] + + *) Added server_scheme field to server_rec for above. Minor MMN bump. + [Sander Temme] + *) mod_cache: Make caching of reverse SSL proxies possible again. PR 39593. [Ruediger Pluem, Joe Orton] diff --git a/STATUS b/STATUS index 7f848ae58db..f9a231e0d8f 100644 --- a/STATUS +++ b/STATUS @@ -76,16 +76,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * Add optional 'scheme://' part to ServerName directive for cases - where httpd runs behind an external SSL processor and has to - learn from its configuration how to generate correct - self-referential URLs. - Code: - http://people.apache.org/~sctemme/servername_22x.patch - Documentation: - http://svn.apache.org/viewcvs.cgi?diff_format=h&view=rev&rev=406697 - +1 sctemme, rpluem, wrowe - PATCHES PROPOSED TO BACKPORT FROM TRUNK: * mod_isapi: Simply backport the host of fixes for compilation on unix, diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en index d79f055130e..3f832a6fa5f 100644 --- a/docs/manual/mod/core.html.en +++ b/docs/manual/mod/core.html.en @@ -2765,7 +2765,7 @@ to name-virtual hosts - + @@ -2773,7 +2773,8 @@ itself directive supersedes the functionality of the Port directive from version 1.3.
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
Module:core
-

The ServerName directive sets the hostname and +

The 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, @@ -2788,11 +2789,10 @@ itself

If no 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 @@ -2800,14 +2800,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.

+

See also