From 90a77e573d9a3164b45c5dc49b1b4b685fbd2cb5 Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Fri, 27 Apr 2012 05:17:57 +0000 Subject: [PATCH] Syntax updates for mod_r*.xml git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331219 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_ratelimit.xml | 10 ++++---- docs/manual/mod/mod_reflector.xml | 24 +++++++++--------- docs/manual/mod/mod_remoteip.xml | 40 ++++++++++++++++++++---------- docs/manual/mod/mod_reqtimeout.xml | 16 ++++++------ docs/manual/mod/mod_rewrite.xml | 38 +++++++++++++--------------- 5 files changed, 69 insertions(+), 59 deletions(-) diff --git a/docs/manual/mod/mod_ratelimit.xml b/docs/manual/mod/mod_ratelimit.xml index 0128def459..e386dd581d 100644 --- a/docs/manual/mod/mod_ratelimit.xml +++ b/docs/manual/mod/mod_ratelimit.xml @@ -38,12 +38,12 @@ The connection speed to be simulated is specified, in KiB/s, using the environme variable rate-limit.

Example Configuration -<Location /downloads>
- -SetOutputFilter RATE_LIMIT
-SetEnv rate-limit 400
-
+ +<Location /downloads> + SetOutputFilter RATE_LIMIT + SetEnv rate-limit 400 </Location> +
diff --git a/docs/manual/mod/mod_reflector.xml b/docs/manual/mod/mod_reflector.xml index 880170e8b7..17e5d2c813 100644 --- a/docs/manual/mod/mod_reflector.xml +++ b/docs/manual/mod/mod_reflector.xml @@ -43,23 +43,23 @@
Pass the request body through the DEFLATE filter to compress the body. This request requires a Content-Encoding request header containing "gzip" for the filter to return compressed data. - - <Location /compress>
- SetHandler reflector
- SetOutputFilter DEFLATE
- </Location> -
+ +<Location /compress> + SetHandler reflector + SetOutputFilter DEFLATE +</Location> +
Image downsampling service
Pass the request body through an image downsampling filter, and reflect the results to the caller. - - <Location /downsample>
- SetHandler reflector
- SetOutputFilter DOWNSAMPLE
- </Location> -
+ +<Location /downsample> + SetHandler reflector + SetOutputFilter DOWNSAMPLE +</Location> +
diff --git a/docs/manual/mod/mod_remoteip.xml b/docs/manual/mod/mod_remoteip.xml index 06b5dd2833..63634e3769 100644 --- a/docs/manual/mod/mod_remoteip.xml +++ b/docs/manual/mod/mod_remoteip.xml @@ -118,11 +118,15 @@ via the request headers. hosts presenting a RemoteIPHeader IP value.

Internal (Load Balancer) Example + RemoteIPHeader X-Client-IP + Proxy Example + RemoteIPHeader X-Forwarded-For + @@ -142,9 +146,11 @@ via the request headers. trusted when passed from these proxies.

Internal (Load Balancer) Example - RemoteIPHeader X-Client-IP
- RemoteIPTrustedProxy 10.0.2.0/24
- RemoteIPTrustedProxy gateway.localdomain + +RemoteIPHeader X-Client-IP +RemoteIPTrustedProxy 10.0.2.0/24 +RemoteIPTrustedProxy gateway.localdomain +
@@ -170,9 +176,11 @@ via the request headers. conf/trusted-proxies.lst contents - # Our internally trusted proxies;
- 10.0.2.0/24 #Everyone in the testing group
- gateway.localdomain #The front end balancer +
+# Our internally trusted proxies;
+10.0.2.0/24         #Everyone in the testing group
+gateway.localdomain #The front end balancer
+         
@@ -193,8 +201,10 @@ via the request headers. RemoteIPInternalProxy addresses are discarded.

Example - RemoteIPHeader X-Forwarded-For
- RemoteIPProxiesHeader X-Forwarded-By + +RemoteIPHeader X-Forwarded-For +RemoteIPProxiesHeader X-Forwarded-By +
@@ -216,9 +226,11 @@ via the request headers. RemoteIPHeader header's value.

Trusted (Load Balancer) Example - RemoteIPHeader X-Forwarded-For
- RemoteIPTrustedProxy 10.0.2.16/28
- RemoteIPTrustedProxy proxy.example.com + +RemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxy 10.0.2.16/28 +RemoteIPTrustedProxy proxy.example.com +
@@ -239,8 +251,10 @@ via the request headers. the RemoteIPTrustedProxy directive.

Trusted (Load Balancer) Example - RemoteIPHeader X-Forwarded-For
- RemoteIPTrustedProxyList conf/trusted-proxies.lst + +RemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxyList conf/trusted-proxies.lst +
conf/trusted-proxies.lst contents diff --git a/docs/manual/mod/mod_reqtimeout.xml b/docs/manual/mod/mod_reqtimeout.xml index 5697a7f6e2..cb5d5c89b2 100644 --- a/docs/manual/mod/mod_reqtimeout.xml +++ b/docs/manual/mod/mod_reqtimeout.xml @@ -37,9 +37,9 @@ Allow 10 seconds to receive the request including the headers and 30 seconds for receiving the request body: - + RequestReadTimeout header=10 body=30 - +
  • @@ -49,9 +49,9 @@ the limit given indirectly by LimitRequestBody): - + RequestReadTimeout body=10,MinRate=1000 - +
  • @@ -60,9 +60,9 @@ 500 bytes received. But do not allow more than 30 seconds for the request including the headers: - + RequestReadTimeout header=10-30,MinRate=500 - +
  • @@ -70,9 +70,9 @@ If a common configuration is used for http and https virtual hosts, the timeouts should not be set too low: - + RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 - +
  • diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index 45fb0d8095..7ba1eddd3f 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -69,7 +69,9 @@ URLs on the fly Example + LogLevel alert rewrite:trace3 + RewriteLog @@ -234,16 +236,16 @@ Apache HTTP Server 2.0.41 and later

    For example, you might define a RewriteMap as:

    - + RewriteMap examplemap txt:/path/to/file/map.txt - +

    You would then be able to use this map in a RewriteRule as follows:

    - + RewriteRule ^/ex/(.*) ${examplemap:$1} - +

    The following combinations for MapType and MapSource can be used:

    @@ -316,17 +318,15 @@ Apache HTTP Server 2.0.41 and later since the resource was not relative to the document root. This misconfiguration would normally cause the server to look for an "opt" directory under the document root.

    - -
    +
     DocumentRoot /var/www/example.com
     Alias /myapp /opt/myapp-1.2.3
     <Directory /opt/myapp-1.2.3>
    -RewriteEngine On
    -RewriteBase /myapp/
    -RewriteRule ^index\.html$  welcome.html 
    +    RewriteEngine On
    +    RewriteBase /myapp/
    +    RewriteRule ^index\.html$  welcome.html 
     </Directory>
    -
    -
    + @@ -803,10 +803,10 @@ RewriteRule ^index\.html$ welcome.html to block unwanted hotlinking.

    - + RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
    RewriteRule ^/images - [F] -
    +
  • You can also set special flags for @@ -832,14 +832,12 @@ RewriteRule ^index\.html$ welcome.html Use this to combine rule conditions with a local OR instead of the implicit AND. Typical example: - -
    +
     RewriteCond %{REMOTE_HOST}  ^host1  [OR]
     RewriteCond %{REMOTE_HOST}  ^host2  [OR]
     RewriteCond %{REMOTE_HOST}  ^host3
     RewriteRule ...some special stuff for any of these hosts...
    -
    -
    + Without this flag you would have to write the condition/rule pair three times. @@ -864,8 +862,7 @@ RewriteRule ...some special stuff for any of these hosts... ``User-Agent:'' header of the request, you can use the following:

    - -
    +
     RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
     RewriteRule  ^/$                 /homepage.max.html  [L]
     
    @@ -873,8 +870,7 @@ RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
     RewriteRule  ^/$                 /homepage.min.html  [L]
     
     RewriteRule  ^/$                 /homepage.std.html  [L]
    -
    -
    +

    Explanation: If you use a browser which identifies itself as 'Mozilla' (including Netscape Navigator, Mozilla etc), then you -- 2.50.0