From: Rich Bowen Date: Sat, 21 Nov 2009 00:24:21 +0000 (+0000) Subject: Adds vhosts and proxy docs, and updates the seealso sections in X-Git-Tag: 2.3.4~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb4e2acc932e8450751b87fee1b40063aa5bc415;p=apache Adds vhosts and proxy docs, and updates the seealso sections in everything. proxy only has one rule in it, and vhosts is empty. Will fix that soon. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882805 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/access.html.en b/docs/manual/rewrite/access.html.en index 6f0dc6725d..6c292911f0 100644 --- a/docs/manual/rewrite/access.html.en +++ b/docs/manual/rewrite/access.html.en @@ -39,7 +39,7 @@ configuration.
  • Blocking of Robots
  • Denying Hosts in a Blacklist
  • Referer-based Deflector
  • -

    See also

    +

    See also

    top

    Forbidding Image "Hotlinking"

    diff --git a/docs/manual/rewrite/access.xml b/docs/manual/rewrite/access.xml index 7a87eb5387..33b1dca80e 100644 --- a/docs/manual/rewrite/access.xml +++ b/docs/manual/rewrite/access.xml @@ -44,6 +44,8 @@ configuration. mod_rewrite introduction Redirection and remapping +Virtual hosts +Proxying Advanced techniques and tricks When not to use mod_rewrite diff --git a/docs/manual/rewrite/advanced.html.en b/docs/manual/rewrite/advanced.html.en index ff33735402..da18f4e1c6 100644 --- a/docs/manual/rewrite/advanced.html.en +++ b/docs/manual/rewrite/advanced.html.en @@ -40,7 +40,7 @@ configuration.
  • Redirecting Anchors
  • Time-Dependent Rewriting
  • Set Environment Variables Based On URL Parts
  • -

    See also

    +

    See also

    top

    URL-based sharding accross multiple backends

    diff --git a/docs/manual/rewrite/advanced.xml b/docs/manual/rewrite/advanced.xml index 67253d187a..5a46f606ca 100644 --- a/docs/manual/rewrite/advanced.xml +++ b/docs/manual/rewrite/advanced.xml @@ -41,7 +41,9 @@ configuration. mod_rewrite introduction Redirection and remapping Controlling access - +Virtual hosts +Proxying + When not to use mod_rewrite
    diff --git a/docs/manual/rewrite/avoid.html.en b/docs/manual/rewrite/avoid.html.en index b5bfe94a73..c042e75893 100644 --- a/docs/manual/rewrite/avoid.html.en +++ b/docs/manual/rewrite/avoid.html.en @@ -39,7 +39,7 @@ them, rather than merely cutting and pasting the examples into your configuration.

    -

    See also

    +

    See also

    Available Languages:  en 

    diff --git a/docs/manual/rewrite/avoid.xml b/docs/manual/rewrite/avoid.xml index 192fe54c0d..7ca79d0518 100644 --- a/docs/manual/rewrite/avoid.xml +++ b/docs/manual/rewrite/avoid.xml @@ -48,8 +48,10 @@ configuration.

    mod_rewrite introduction Redirection and remapping Controlling access +Virtual hosts +Proxying Advanced techniques and tricks - + diff --git a/docs/manual/rewrite/proxy.html b/docs/manual/rewrite/proxy.html new file mode 100644 index 0000000000..94eceb093e --- /dev/null +++ b/docs/manual/rewrite/proxy.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: proxy.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/proxy.html.en b/docs/manual/rewrite/proxy.html.en new file mode 100644 index 0000000000..a7a0f69d85 --- /dev/null +++ b/docs/manual/rewrite/proxy.html.en @@ -0,0 +1,93 @@ + + + +Using mod_rewrite for Proxying - Apache HTTP Server + + + + + +
    <-
    +

    Using mod_rewrite for Proxying

    +
    +

    Available Languages:  en 

    +
    + + +

    This document supplements the mod_rewrite +reference documentation. It describes +how to use the RewriteRule's [P] flag to proxy content to another server. +A number of recipes are provided that describe common scenarios.

    + +
    + +
    top
    +
    +

    Proxying Content with mod_rewrite

    + + + +
    +
    Description:
    + +
    +

    + mod_rewrite provides the [P] flag, which allows URLs to be passed, + via mod_proxy, to another server. Two examples are given here. In + one example, a URL is passed directly to another server, and served + as though it were a local URL. In the other example, we proxy + missing content to a back-end server.

    +
    + +
    Solution:
    + +
    +

    To simply map a URL to another server, we use the [P] flag, as + follows:

    + +
    +RewriteEngine  on
    +RewriteBase    /products/
    +RewriteRule    ^widget/(.*)$  http://product.example.com/widget/$1  [P]
    +ProxyPassReverse /products/widget/ http://product.example.com/widget/
    +
    + +

    In the second example, we proxy the request only if we can't find + the resource locally. This can be very useful when you're migrating + from one server to another, and you're not sure if all the content + has been migrated yet.

    + +
    +RewriteCond %{REQUEST_FILENAME}       !-f
    +RewriteCond %{REQUEST_FILENAME}       !-d
    +RewriteRule ^/(.*) http://old.example.com$1 [P]
    +ProxyPassReverse / http://old.example.com/
    +
    +
    + +
    Discussion:
    + +

    In each case, we add a ProxyPassReverse directive to ensure + that any redirects issued by the backend are correctly passed on to + the client.

    + +

    Consider using either ProxyPass or ProxyPassMatch whenever possible in + preference to mod_rewrite.

    +
    +
    + +
    +
    +

    Available Languages:  en 

    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/proxy.xml b/docs/manual/rewrite/proxy.xml new file mode 100644 index 0000000000..8e59531b25 --- /dev/null +++ b/docs/manual/rewrite/proxy.xml @@ -0,0 +1,103 @@ + + + + + + + + + Rewrite + +Using mod_rewrite for Proxying + + + +

    This document supplements the mod_rewrite +reference documentation. It describes +how to use the RewriteRule's [P] flag to proxy content to another server. +A number of recipes are provided that describe common scenarios.

    + +
    +Module documentation +mod_rewrite introduction +Redirection and remapping +Controlling access +Virtual hosts + +Advanced techniques and tricks +When not to use mod_rewrite + +
    + + Proxying Content with mod_rewrite + +
    +
    Description:
    + +
    +

    + mod_rewrite provides the [P] flag, which allows URLs to be passed, + via mod_proxy, to another server. Two examples are given here. In + one example, a URL is passed directly to another server, and served + as though it were a local URL. In the other example, we proxy + missing content to a back-end server.

    +
    + +
    Solution:
    + +
    +

    To simply map a URL to another server, we use the [P] flag, as + follows:

    + +
    +RewriteEngine  on
    +RewriteBase    /products/
    +RewriteRule    ^widget/(.*)$  http://product.example.com/widget/$1  [P]
    +ProxyPassReverse /products/widget/ http://product.example.com/widget/
    +
    + +

    In the second example, we proxy the request only if we can't find + the resource locally. This can be very useful when you're migrating + from one server to another, and you're not sure if all the content + has been migrated yet.

    + +
    +RewriteCond %{REQUEST_FILENAME}       !-f
    +RewriteCond %{REQUEST_FILENAME}       !-d
    +RewriteRule ^/(.*) http://old.example.com$1 [P]
    +ProxyPassReverse / http://old.example.com/
    +
    +
    + +
    Discussion:
    + +

    In each case, we add a ProxyPassReverse directive to ensure + that any redirects issued by the backend are correctly passed on to + the client.

    + +

    Consider using either ProxyPass or ProxyPassMatch whenever possible in + preference to mod_rewrite.

    +
    +
    + +
    + +
    diff --git a/docs/manual/rewrite/proxy.xml.meta b/docs/manual/rewrite/proxy.xml.meta new file mode 100644 index 0000000000..d71d22d39a --- /dev/null +++ b/docs/manual/rewrite/proxy.xml.meta @@ -0,0 +1,12 @@ + + + + + proxy + /rewrite/ + .. + + + en + + diff --git a/docs/manual/rewrite/remapping.html.en b/docs/manual/rewrite/remapping.html.en index 6ef1e53fca..87e6a20c20 100644 --- a/docs/manual/rewrite/remapping.html.en +++ b/docs/manual/rewrite/remapping.html.en @@ -48,8 +48,7 @@ configuration.
  • Moved DocumentRoot
  • Fallback Resource
  • Mass Virtual Hosting
  • -
  • Proxying Content with mod_rewrite
  • -

    See also

    +

    See also

    top

    From Old to New (internal)

    @@ -655,61 +654,6 @@ file, as well as in a <Directory> block.

    -
    top
    -
    -

    Proxying Content with mod_rewrite

    - - - -
    -
    Description:
    - -
    -

    - mod_rewrite provides the [P] flag, which allows URLs to be passed, - via mod_proxy, to another server. Two examples are given here. In - one example, a URL is passed directly to another server, and served - as though it were a local URL. In the other example, we proxy - missing content to a back-end server.

    -
    - -
    Solution:
    - -
    -

    To simply map a URL to another server, we use the [P] flag, as - follows:

    - -
    -RewriteEngine  on
    -RewriteBase    /products/
    -RewriteRule    ^widget/(.*)$  http://product.example.com/widget/$1  [P]
    -ProxyPassReverse /products/widget/ http://product.example.com/widget/
    -
    - -

    In the second example, we proxy the request only if we can't find - the resource locally. This can be very useful when you're migrating - from one server to another, and you're not sure if all the content - has been migrated yet.

    - -
    -RewriteCond %{REQUEST_FILENAME}       !-f
    -RewriteCond %{REQUEST_FILENAME}       !-d
    -RewriteRule ^/(.*) http://old.example.com$1 [P]
    -ProxyPassReverse / http://old.example.com/
    -
    -
    - -
    Discussion:
    - -

    In each case, we add a ProxyPassReverse directive to ensure - that any redirects issued by the backend are correctly passed on to - the client.

    - -

    Consider using either ProxyPass or ProxyPassMatch whenever possible in - preference to mod_rewrite.

    -
    -
    -

    Available Languages:  en 

    diff --git a/docs/manual/rewrite/remapping.xml b/docs/manual/rewrite/remapping.xml index 8e87235019..c91ca97f1c 100644 --- a/docs/manual/rewrite/remapping.xml +++ b/docs/manual/rewrite/remapping.xml @@ -41,8 +41,10 @@ configuration. Module documentation mod_rewrite introduction - + Controlling access +Virtual hosts +Proxying Advanced techniques and tricks When not to use mod_rewrite @@ -664,62 +666,4 @@ file, as well as in a <Directory> block.

    -
    - - Proxying Content with mod_rewrite - -
    -
    Description:
    - -
    -

    - mod_rewrite provides the [P] flag, which allows URLs to be passed, - via mod_proxy, to another server. Two examples are given here. In - one example, a URL is passed directly to another server, and served - as though it were a local URL. In the other example, we proxy - missing content to a back-end server.

    -
    - -
    Solution:
    - -
    -

    To simply map a URL to another server, we use the [P] flag, as - follows:

    - -
    -RewriteEngine  on
    -RewriteBase    /products/
    -RewriteRule    ^widget/(.*)$  http://product.example.com/widget/$1  [P]
    -ProxyPassReverse /products/widget/ http://product.example.com/widget/
    -
    - -

    In the second example, we proxy the request only if we can't find - the resource locally. This can be very useful when you're migrating - from one server to another, and you're not sure if all the content - has been migrated yet.

    - -
    -RewriteCond %{REQUEST_FILENAME}       !-f
    -RewriteCond %{REQUEST_FILENAME}       !-d
    -RewriteRule ^/(.*) http://old.example.com$1 [P]
    -ProxyPassReverse / http://old.example.com/
    -
    -
    - -
    Discussion:
    - -

    In each case, we add a ProxyPassReverse directive to ensure - that any redirects issued by the backend are correctly passed on to - the client.

    - -

    Consider using either ProxyPass or ProxyPassMatch whenever possible in - preference to mod_rewrite.

    -
    -
    - -
    - diff --git a/docs/manual/rewrite/vhosts.html b/docs/manual/rewrite/vhosts.html new file mode 100644 index 0000000000..b99209bdf6 --- /dev/null +++ b/docs/manual/rewrite/vhosts.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: vhosts.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/vhosts.html.en b/docs/manual/rewrite/vhosts.html.en new file mode 100644 index 0000000000..98e664574a --- /dev/null +++ b/docs/manual/rewrite/vhosts.html.en @@ -0,0 +1,42 @@ + + + +Using mod_rewrite for virtual hosting - Apache HTTP Server + + + + + +
    <-
    +

    Using mod_rewrite for virtual hosting

    +
    +

    Available Languages:  en 

    +
    + + +

    This document supplements the mod_rewrite +reference documentation. It describes +how you can use mod_rewrite to create dynamically +configured virtual hosts.

    + +
    mod_rewrite is not the best way to configure +virtual hosts. You should first consider the alternatives before resorting to +mod_rewrite.
    + +
    + +
    +
    +

    Available Languages:  en 

    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/vhosts.xml b/docs/manual/rewrite/vhosts.xml new file mode 100644 index 0000000000..a5d7f103b6 --- /dev/null +++ b/docs/manual/rewrite/vhosts.xml @@ -0,0 +1,50 @@ + + + + + + + + + Rewrite + +Using mod_rewrite for virtual hosting + + + +

    This document supplements the mod_rewrite +reference documentation. It describes +how you can use mod_rewrite to create dynamically +configured virtual hosts.

    + +mod_rewrite is not the best way to configure +virtual hosts. You should first consider the alternatives before resorting to +mod_rewrite. + +
    +Module documentation +mod_rewrite introduction +Redirection and remapping +Controlling access + +Proxying +Advanced techniques and tricks +When not to use mod_rewrite + +
    diff --git a/docs/manual/rewrite/vhosts.xml.meta b/docs/manual/rewrite/vhosts.xml.meta new file mode 100644 index 0000000000..cf046a576d --- /dev/null +++ b/docs/manual/rewrite/vhosts.xml.meta @@ -0,0 +1,12 @@ + + + + + vhosts + /rewrite/ + .. + + + en + +