From b17495921eb61d3a1cfa40dca88e9bf1e24fcabe Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Fri, 27 Apr 2012 04:27:38 +0000 Subject: [PATCH] Syntax updates for mod_m*.xml git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331214 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_mime.xml | 146 ++++++++++++++++------------- docs/manual/mod/mod_mime_magic.xml | 2 + 2 files changed, 84 insertions(+), 64 deletions(-) diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml index a38bdd46ba..211be9548d 100644 --- a/docs/manual/mod/mod_mime.xml +++ b/docs/manual/mod/mod_mime.xml @@ -143,11 +143,11 @@ module="mod_mime_magic">MimeMagicFile of using AddHandler cgi-script .cgi, use

Configure handler based on final extension only - <FilesMatch \.cgi$> - - SetHandler cgi-script - - </FilesMatch> + +<FilesMatch \.cgi$> + SetHandler cgi-script +</FilesMatch> + @@ -192,7 +192,7 @@ module="mod_mime_magic">MimeMagicFile resource, in order to tell the client browser about the encoding method.

- Content-encoding: pkzip + Content-encoding: pkzip
Character sets and languages @@ -232,8 +232,8 @@ module="mod_mime_magic">MimeMagicFile render the information.

- Content-Language: en, fr
- Content-Type: text/plain; charset=ISO-8859-1 +Content-Language: en, fr +Content-Type: text/plain; charset=ISO-8859-1

The language specification is the two-letter abbreviation @@ -263,10 +263,12 @@ charset extension.

Example - AddLanguage ja .ja
- AddCharset EUC-JP .euc
- AddCharset ISO-2022-JP .jis
- AddCharset SHIFT_JIS .sjis + +AddLanguage ja .ja +AddCharset EUC-JP .euc +AddCharset ISO-2022-JP .jis +AddCharset SHIFT_JIS .sjis +

Then the document xxxx.ja.jis will be treated @@ -310,8 +312,10 @@ type extension.

Example - AddEncoding x-gzip .gz
- AddEncoding x-compress .Z + +AddEncoding x-gzip .gz +AddEncoding x-compress .Z +

This will cause filenames containing the .gz extension @@ -359,9 +363,9 @@ handler activate CGI scripts with the file extension .cgi, you might use:

- + AddHandler cgi-script .cgi - +

Once that has been put into your httpd.conf file, any file containing the .cgi extension will be treated as a CGI program.

@@ -431,9 +435,11 @@ language extension.

Example - AddEncoding x-compress .Z
- AddLanguage en .en
- AddLanguage fr .fr + +AddEncoding x-compress .Z +AddLanguage en .en +AddLanguage fr .fr +

Then the document xxxx.en.Z will be treated as @@ -449,11 +455,11 @@ language extension, the last one encountered is the one that is used. That is, for the case of:

- - AddLanguage en .en
- AddLanguage en-gb .en
- AddLanguage en-us .en -
+ +AddLanguage en .en +AddLanguage en-gb .en +AddLanguage en-us .en +

documents with the extension .en would be treated as being en-us.

@@ -494,9 +500,9 @@ later. .shtml files for server-side includes and will then compress the output using mod_deflate.

- + AddOutputFilter INCLUDES;DEFLATE shtml - +

If more than one filter is specified, they must be separated by semicolons in the order in which they should process the @@ -514,34 +520,26 @@ later. the AddOutputFilter directive.

- - # Effective filter "DEFLATE"
- AddOutputFilter DEFLATE shtml
- <Location /foo>
- - # Effective filter "INCLUDES", replacing "DEFLATE"
- AddOutputFilter INCLUDES shtml
-
- </Location>
- <Location /bar>
- - # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE"
- AddOutputFilter INCLUDES;DEFLATE shtml
-
- </Location>
- <Location /bar/baz>
- - # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE"
- AddOutputFilter BUFFER shtml
-
- </Location>
- <Location /bar/baz/buz>
- - # No effective filter, replacing "BUFFER"
- RemoveOutputFilter shtml
-
- </Location> -
+ +# Effective filter "DEFLATE" +AddOutputFilter DEFLATE shtml +<Location /foo> + # Effective filter "INCLUDES", replacing "DEFLATE" + AddOutputFilter INCLUDES shtml +</Location> +<Location /bar> + # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE" + AddOutputFilter INCLUDES;DEFLATE shtml +</Location> +<Location /bar/baz> + # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE" + AddOutputFilter BUFFER shtml +</Location> +<Location /bar/baz/buz> + # No effective filter, replacing "BUFFER" + RemoveOutputFilter shtml +</Location> + RemoveOutputFilter SetOutputFilter @@ -573,13 +571,17 @@ type Example + AddType image/gif .gif +

Or, to specify multiple file extensions in one directive:

Example + AddType image/jpeg jpeg jpg jpe +

The extension argument is case-insensitive and can @@ -594,7 +596,9 @@ type qs:

Example - Addtype application/rss+xml;qs=0.8 .xml + + AddType application/rss+xml;qs=0.8 .xml +

This is useful in situations, e.g. when a client @@ -658,9 +662,9 @@ a matching file with MultiViews and filters to participate in Multviews, but will exclude unknown files:

- + MultiviewsMatch Handlers Filters - +

MultiviewsMatch is not allowed in a Location or Content-Language header field will be generated.

Example + DefaultLanguage en + mod_negotiation @@ -725,7 +731,9 @@ components as part of the filename

This directive is recommended when you have a virtual filesystem.

Example + ModMimeUsePathInfo On +

If you have a request for /index.php/foo.shtml @@ -764,7 +772,9 @@ later. be specified with or without a leading dot.

Example + RemoveCharset .html .shtml + @@ -787,13 +797,13 @@ extensions server config files. An example of its use might be:

/foo/.htaccess: - AddEncoding x-gzip .gz
- AddType text/plain .asc
- <Files *.gz.asc>
- - RemoveEncoding .gz
-
- </Files> + +AddEncoding x-gzip .gz +AddType text/plain .asc +<Files *.gz.asc> + RemoveEncoding .gz +</Files> +

This will cause foo.gz to be marked as being @@ -830,11 +840,15 @@ extensions config files. An example of its use might be:

/foo/.htaccess: + AddHandler server-parsed .html + /foo/bar/.htaccess: + RemoveHandler .html +

This has the effect of returning .html files in @@ -922,7 +936,9 @@ later. be specified with or without a leading dot.

Example + RemoveOutputFilter shtml + AddOutputFilter @@ -947,7 +963,9 @@ extensions might be:

/foo/.htaccess: + RemoveType .cgi +

This will remove any special handling of .cgi diff --git a/docs/manual/mod/mod_mime_magic.xml b/docs/manual/mod/mod_mime_magic.xml index 0c40c38fb0..bd79868a4e 100644 --- a/docs/manual/mod/mod_mime_magic.xml +++ b/docs/manual/mod/mod_mime_magic.xml @@ -264,7 +264,9 @@ using the specified magic file server's file.

Example + MimeMagicFile conf/magic + -- 2.40.0