From: Joshua Slive Date: Fri, 14 Jun 2002 02:57:00 +0000 (+0000) Subject: Add some information about reverse proxying to the url mapping document. X-Git-Tag: 2.0.38~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50a906c7806d969d4a1132a39ad53f94fae326d7;p=apache Add some information about reverse proxying to the url mapping document. Also, while I'm in there, make some of the user-matching regexes more restrictive. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95664 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/urlmapping.html b/docs/manual/urlmapping.html index 627dcf053f..a127bb1c16 100755 --- a/docs/manual/urlmapping.html +++ b/docs/manual/urlmapping.html @@ -3,8 +3,6 @@ - - Mapping URLs to Filesystem Locations - Apache HTTP Server @@ -30,6 +28,8 @@
  • URL Redirection
  • +
  • Reverse Proxy
  • +
  • Rewrite Engine
  • File Not Found
  • @@ -41,6 +41,7 @@ Related Modules

    mod_alias
    + mod_proxy
    mod_rewrite
    mod_userdir
    mod_speling
    @@ -60,6 +61,8 @@ ErrorDocument
    Options
    + ProxyPass
    + ProxyPassReverse
    Redirect
    RedirectMatch
    @@ -137,7 +140,7 @@ substitution. For example,

    - ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) + ScriptAliasMatch ^/~([a-zA-Z0-9]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
    @@ -188,7 +191,7 @@ following AliasMatch directive:

    - AliasMatch ^/upages/([^/]*)/?(.*) + AliasMatch ^/upages/([a-zA-Z0-9]*)/?(.*) /home/$1/public_html/$2
    @@ -238,18 +241,52 @@ http://www.example.com/startpage.html + +

    Reverse Proxy

    + +

    Apache also allows you to bring remote documents into the URL space +of the local server. This technique is called reverse +proxying because the web server acts like a proxy server by +fetching the documents from a remote server and returning them to the +client. It is different from normal proxying because, to the client, +it appears the documents originate at the reverse proxy server.

    + +

    In the following example, when clients request documents under the +/foo/ directory, the server fetches those documents from +the /bar/ directory on internal.example.com +and returns them to the client as if they were from the local +server.

    + +
    +ProxyPass /foo/ http://internal.example.com/bar/
    +ProxyPassReverse /foo/ http://internal.example.com/bar/ +
    + +

    The ProxyPass configures +the server to fetch the appropriate documents, while the ProxyPassReverse +directive rewrites redirects originating at +internal.examle.com so that they target the appropriate +directory on the local server. It is important to note, however, that +links inside the documents will not be rewritten. So any absolute +links on internal.example.com will result in the client +breaking out of the proxy server and requesting directly from +internal.example.com.

    + +

    Rewriting Engine

    -

    When even more powerful substitution is required, the - rewriting engine provided by mod_rewrite can be useful. The - directives provided by this module use characteristics of the - request such as browser type or source IP address in deciding - from where to serve content. In addition, mod_rewrite can use - external database files or programs to determine how to handle - a request. Many practical examples employing mod_rewrite are - discussed in the URL Rewriting - Guide.

    +

    When even more powerful substitution is required, the rewriting + engine provided by mod_rewrite + can be useful. The directives provided by this module use + characteristics of the request such as browser type or source IP + address in deciding from where to serve content. In addition, + mod_rewrite can use external database files or programs to + determine how to handle a request. The rewriting engine is capable + of performing all three types of mappings discussed above: + internal redirects (aliases), external redirects, and proxying. + Many practical examples employing mod_rewrite are discussed in the + URL Rewriting Guide.

    File Not Found

    diff --git a/docs/manual/urlmapping.html.en b/docs/manual/urlmapping.html.en index 627dcf053f..a127bb1c16 100755 --- a/docs/manual/urlmapping.html.en +++ b/docs/manual/urlmapping.html.en @@ -3,8 +3,6 @@ - - Mapping URLs to Filesystem Locations - Apache HTTP Server @@ -30,6 +28,8 @@
  • URL Redirection
  • +
  • Reverse Proxy
  • +
  • Rewrite Engine
  • File Not Found
  • @@ -41,6 +41,7 @@ Related Modules

    mod_alias
    + mod_proxy
    mod_rewrite
    mod_userdir
    mod_speling
    @@ -60,6 +61,8 @@ ErrorDocument
    Options
    + ProxyPass
    + ProxyPassReverse
    Redirect
    RedirectMatch
    @@ -137,7 +140,7 @@ substitution. For example,

    - ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) + ScriptAliasMatch ^/~([a-zA-Z0-9]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
    @@ -188,7 +191,7 @@ following AliasMatch directive:

    - AliasMatch ^/upages/([^/]*)/?(.*) + AliasMatch ^/upages/([a-zA-Z0-9]*)/?(.*) /home/$1/public_html/$2
    @@ -238,18 +241,52 @@ http://www.example.com/startpage.html + +

    Reverse Proxy

    + +

    Apache also allows you to bring remote documents into the URL space +of the local server. This technique is called reverse +proxying because the web server acts like a proxy server by +fetching the documents from a remote server and returning them to the +client. It is different from normal proxying because, to the client, +it appears the documents originate at the reverse proxy server.

    + +

    In the following example, when clients request documents under the +/foo/ directory, the server fetches those documents from +the /bar/ directory on internal.example.com +and returns them to the client as if they were from the local +server.

    + +
    +ProxyPass /foo/ http://internal.example.com/bar/
    +ProxyPassReverse /foo/ http://internal.example.com/bar/ +
    + +

    The ProxyPass configures +the server to fetch the appropriate documents, while the ProxyPassReverse +directive rewrites redirects originating at +internal.examle.com so that they target the appropriate +directory on the local server. It is important to note, however, that +links inside the documents will not be rewritten. So any absolute +links on internal.example.com will result in the client +breaking out of the proxy server and requesting directly from +internal.example.com.

    + +

    Rewriting Engine

    -

    When even more powerful substitution is required, the - rewriting engine provided by mod_rewrite can be useful. The - directives provided by this module use characteristics of the - request such as browser type or source IP address in deciding - from where to serve content. In addition, mod_rewrite can use - external database files or programs to determine how to handle - a request. Many practical examples employing mod_rewrite are - discussed in the URL Rewriting - Guide.

    +

    When even more powerful substitution is required, the rewriting + engine provided by mod_rewrite + can be useful. The directives provided by this module use + characteristics of the request such as browser type or source IP + address in deciding from where to serve content. In addition, + mod_rewrite can use external database files or programs to + determine how to handle a request. The rewriting engine is capable + of performing all three types of mappings discussed above: + internal redirects (aliases), external redirects, and proxying. + Many practical examples employing mod_rewrite are discussed in the + URL Rewriting Guide.

    File Not Found