From: Daniel Gruno Date: Thu, 26 Apr 2012 17:23:00 +0000 (+0000) Subject: Syntax updates for mod_d*.xml X-Git-Tag: 2.5.0-alpha~7005 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f63deb193d553cba1dbbe4d685ed31926d86c3c;p=thirdparty%2Fapache%2Fhttpd.git Syntax updates for mod_d*.xml git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1330980 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_data.xml b/docs/manual/mod/mod_data.xml index 6de297478ec..51b9b58e7f6 100644 --- a/docs/manual/mod/mod_data.xml +++ b/docs/manual/mod/mod_data.xml @@ -56,11 +56,11 @@ module.

Configuring the filter - <Location /data/images>
- - SetOutputFilter DATA - - </Location>
+ +<Location /data/images> + SetOutputFilter DATA +</Location> +
diff --git a/docs/manual/mod/mod_dav.xml b/docs/manual/mod/mod_dav.xml index 6f1daf1337e..c85cb9f14e1 100644 --- a/docs/manual/mod/mod_dav.xml +++ b/docs/manual/mod/mod_dav.xml @@ -45,7 +45,7 @@

To enable mod_dav, add the following to a container in your httpd.conf file:

- Dav On + Dav On

This enables the DAV file system provider, which is implemented by the mod_dav_fs module. Therefore, that module @@ -57,9 +57,9 @@ file using the DavLockDB directive:

- + DavLockDB /usr/local/apache2/var/DavLock - +

The directory containing the lock database file must be writable by the User @@ -77,24 +77,22 @@ requests.

Full Example - DavLockDB /usr/local/apache2/var/DavLock
-
- <Directory /usr/local/apache2/htdocs/foo>
- - Require all granted
- Dav On
-
- AuthType Basic
- AuthName DAV
- AuthUserFile user.passwd
-
- <LimitExcept GET POST OPTIONS>
- - Require user admin
-
- </LimitExcept>
-
- </Directory>
+ +DavLockDB /usr/local/apache2/var/DavLock + +<Directory /usr/local/apache2/htdocs/foo> + Require all granted + Dav On + + AuthType Basic + AuthName DAV + AuthUserFile user.passwd + + <LimitExcept GET POST OPTIONS> + Require user admin + </LimitExcept> +</Directory> +
@@ -150,16 +148,14 @@ will run the script, and one of which will allow it to be downloaded and manipulated with DAV.

- -Alias /phparea /home/gstein/php_files
-Alias /php-source /home/gstein/php_files
+ +Alias /phparea /home/gstein/php_files +Alias /php-source /home/gstein/php_files <Location /php-source> - - DAV On
- ForceType text/plain
-
+ DAV On + ForceType text/plain </Location> -
+

With this setup, http://example.com/phparea can be used to access the output of the PHP scripts, and @@ -178,13 +174,11 @@ Alias /php-source /home/gstein/php_files

Use the Dav directive to enable the WebDAV HTTP methods for the given container:

- - <Location /foo>
- - Dav On
-
- </Location> -
+ +<Location /foo> + Dav On +</Location> +

The value On is actually an alias for the default provider filesystem which is served by the the lock due to network latency.

Example - <Location /MSWord>
- - DavMinTimeout 600
-
- </Location> + +<Location /MSWord> + DavMinTimeout 600 +</Location> +
diff --git a/docs/manual/mod/mod_dav_fs.xml b/docs/manual/mod/mod_dav_fs.xml index 84d10184d20..ce04374974e 100644 --- a/docs/manual/mod/mod_dav_fs.xml +++ b/docs/manual/mod/mod_dav_fs.xml @@ -38,7 +38,9 @@ directive:

Example + Dav filesystem +

Since filesystem is the default provider for @@ -67,7 +69,9 @@ the server to display all locks in a lock database.

--> Example + DavLockDB var/DavLock +

The directory containing the lock database file must be diff --git a/docs/manual/mod/mod_dav_lock.xml b/docs/manual/mod/mod_dav_lock.xml index 5caaaf76ae8..41532b0af98 100644 --- a/docs/manual/mod/mod_dav_lock.xml +++ b/docs/manual/mod/mod_dav_lock.xml @@ -72,7 +72,9 @@ locks.

Example + DavGenericLockDB var/DavLock +

The directory containing the lock database file must be diff --git a/docs/manual/mod/mod_deflate.xml b/docs/manual/mod/mod_deflate.xml index ddef322900b..fd4d2284131 100644 --- a/docs/manual/mod/mod_deflate.xml +++ b/docs/manual/mod/mod_deflate.xml @@ -41,7 +41,9 @@ client

This is a simple sample configuration for the impatient.

Compress only a few types + AddOutputFilterByType DEFLATE text/html text/plain text/xml +

The following configuration, while resulting in more compressed content, @@ -49,29 +51,26 @@ client all the configuration details.

Compress everything except images - <Location />
- - # Insert filter
- SetOutputFilter DEFLATE
-
- # Netscape 4.x has some problems...
- BrowserMatch ^Mozilla/4 gzip-only-text/html
-
- # Netscape 4.06-4.08 have some more problems
- BrowserMatch ^Mozilla/4\.0[678] no-gzip
-
- # MSIE masquerades as Netscape, but it is fine
- BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
- # Don't compress images
- SetEnvIfNoCase Request_URI \
- - \.(?:gif|jpe?g|png)$ no-gzip dont-vary
-
-
- # Make sure proxies don't deliver the wrong content
- Header append Vary User-Agent env=!dont-vary
-
- </Location> + +<Location /> + # Insert filter + SetOutputFilter DEFLATE + + # Netscape 4.x has some problems... + BrowserMatch ^Mozilla/4 gzip-only-text/html + + # Netscape 4.06-4.08 have some more problems + BrowserMatch ^Mozilla/4\.0[678] no-gzip + + # MSIE masquerades as Netscape, but it is fine + BrowserMatch \bMSIE !no-gzip !gzip-only-text/html + # Don't compress images + SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary + + # Make sure proxies don't deliver the wrong content + Header append Vary User-Agent env=!dont-vary +</Location> +
@@ -84,9 +83,9 @@ client will enable compression for documents in the container where it is placed:

- + SetOutputFilter DEFLATE - +

Some popular browsers cannot handle compression of all content so you may want to set the gzip-only-text/html note to @@ -100,13 +99,11 @@ client enabling compression only for the html files of the Apache documentation:

- - <Directory "/your-server-root/manual">
- - AddOutputFilterByType DEFLATE text/html
-
- </Directory> -
+ +<Directory "/your-server-root/manual"> + AddOutputFilterByType DEFLATE text/html +</Directory> +

For browsers that have problems even with compression of all file types, use the excerpt from the configuration example defined in the section above:

- - BrowserMatch ^Mozilla/4 gzip-only-text/html
- BrowserMatch ^Mozilla/4\.0[678] no-gzip
- BrowserMatch \bMSIE !no-gzip !gzip-only-text/html -
+ +BrowserMatch ^Mozilla/4 gzip-only-text/html +BrowserMatch ^Mozilla/4\.0[678] no-gzip +BrowserMatch \bMSIE !no-gzip !gzip-only-text/html +

At first we probe for a User-Agent string that indicates a Netscape Navigator version of 4.x. These versions @@ -159,14 +156,12 @@ client >SetOutputFilter or AddOutputFilter, for example:

- - <Location /dav-area>
- - ProxyPass http://example.com/
- SetOutputFilter INFLATE
-
- </Location> -
+ +<Location /dav-area> + ProxyPass http://example.com/ + SetOutputFilter INFLATE +</Location> +

This Example will uncompress gzip'ed output from example.com, so other filters can do further processing with it. @@ -181,13 +176,11 @@ client >SetInputFilter or AddInputFilter, for example:

- - <Location /dav-area>
- - SetInputFilter DEFLATE
-
- </Location> -
+ +<Location /dav-area> + SetInputFilter DEFLATE +</Location> +

Now if a request contains a Content-Encoding: gzip header, the body will be automatically decompressed. @@ -222,9 +215,9 @@ client in a typical configuration where the addition of the DEFLATE filter depends on the User-Agent, you should add:

- + Header append Vary User-Agent - +

If your decision about compression depends on other information than request headers (e.g. HTTP version), you have to set the @@ -232,7 +225,9 @@ client compliant proxies from caching entirely.

Example + Header set Vary * + @@ -253,10 +248,12 @@ client >access log.

Example - DeflateFilterNote ratio
-
- LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
+ + DeflateFilterNote ratio + + LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate CustomLog logs/deflate_log deflate +

If you want to extract more accurate values from your logs, you @@ -279,12 +276,14 @@ client

Thus you may log it this way:

Accurate Logging - DeflateFilterNote Input instream
- DeflateFilterNote Output outstream
- DeflateFilterNote Ratio ratio
-
- LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
- CustomLog logs/deflate_log deflate + +DeflateFilterNote Input instream +DeflateFilterNote Output outstream +DeflateFilterNote Ratio ratio + +LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate +CustomLog logs/deflate_log deflate +
mod_log_config diff --git a/docs/manual/mod/mod_dialup.xml b/docs/manual/mod/mod_dialup.xml index 4fefae82d36..c8fdf53808e 100644 --- a/docs/manual/mod/mod_dialup.xml +++ b/docs/manual/mod/mod_dialup.xml @@ -36,11 +36,11 @@ the document to validate. --> by the various old modem standards. So, you can browse your site with a 56k V.92 modem, by adding something like this:

- -<Location /mysite>
-ModemStandard V.92
+ +<Location /mysite> + ModemStandard V.92 </Location> -
+

Previously to do bandwidth rate limiting modules would have to block an entire thread, for each client, and insert sleeps to slow the bandwidth down. @@ -58,11 +58,11 @@ once the timer hits. From there the handler can continue to send data to the cl

Specify what modem standard you wish to simulate.

- -<Location /mysite>
-ModemStandard V.26bis
+ +<Location /mysite> + ModemStandard V.26bis </Location> -
+ diff --git a/docs/manual/mod/mod_dir.xml b/docs/manual/mod/mod_dir.xml index 4762cabf426..8265dfde18f 100644 --- a/docs/manual/mod/mod_dir.xml +++ b/docs/manual/mod/mod_dir.xml @@ -77,7 +77,9 @@ a directory directory.

Example + DirectoryIndex index.html +

then a request for http://example.com/docs/ would @@ -87,9 +89,9 @@ a directory

Note that the documents do not need to be relative to the directory;

- + DirectoryIndex index.html index.txt /cgi-bin/index.pl - +

would cause the CGI script /cgi-bin/index.pl to be executed if neither index.html or index.txt @@ -123,7 +125,9 @@ a directory to instead be issued.

Example + DirectoryIndexRedirect on +

A request for http://example.com/docs/ would @@ -168,15 +172,13 @@ a directory be aware that there are possible security implications to doing this.

- - # see security warning below!
- <Location /some/path>
- - DirectorySlash Off
- SetHandler some-handler
-
- </Location> -
+ +# see security warning below! +<Location /some/path> + DirectorySlash Off + SetHandler some-handler +</Location> + Security Warning

Turning off the trailing slash redirect may result in an information @@ -204,9 +206,9 @@ a directory

Use this to set a handler for any URL that doesn't map to anything in your filesystem, and would otherwise return HTTP 404 (Not Found). For example

- - FallbackResource /not-404.php - + + FallbackResource /not-404.php +

will cause requests for non-existent files to be handled by not-404.php, while requests for files that exist are unaffected.

@@ -218,22 +220,18 @@ a directory mod_rewrite, and the use of the -f and -d tests for file and directory existence. This now requires only one line of configuration.

- - FallbackResource /index.php - + + FallbackResource /index.php +

Existing files, such as images, css files, and so on, will be served normally.

In a sub-URI, such as http://example.com/blog/ this sub-URI has to be supplied as local-url:

- - - <Directory /web/example.com/htdocs/blog>
- - FallbackResource /blog/index.php
-
- </Directory> -
-
+ +<Directory /web/example.com/htdocs/blog> + FallbackResource /blog/index.php +</Directory> + diff --git a/docs/manual/mod/mod_dumpio.xml b/docs/manual/mod/mod_dumpio.xml index 3a3535ee616..53add340a02 100644 --- a/docs/manual/mod/mod_dumpio.xml +++ b/docs/manual/mod/mod_dumpio.xml @@ -50,9 +50,9 @@ needs to be configured to LogLevel trace7:

- + LogLevel dumpio:trace7 - + @@ -69,7 +69,9 @@ later.

Enable dumping of all input.

Example + DumpIOInput On + @@ -89,7 +91,9 @@ later.

Enable dumping of all output.

Example + DumpIOOutput On +