]> granicus.if.org Git - apache/commitdiff
Syntaxe updates for mod_e*.xml
authorDaniel Gruno <humbedooh@apache.org>
Thu, 26 Apr 2012 17:42:34 +0000 (17:42 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Thu, 26 Apr 2012 17:42:34 +0000 (17:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1330988 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_echo.xml
docs/manual/mod/mod_env.xml
docs/manual/mod/mod_example.xml
docs/manual/mod/mod_expires.xml
docs/manual/mod/mod_ext_filter.xml

index 46c6975772eb54c7a21cb5dbb778c525aa8920db..af670949ded2801f119759094e260248f353ac0b 100644 (file)
@@ -52,7 +52,9 @@ later.</compatibility>
     disables the echo server.</p>
 
     <example><title>Example</title>
+    <highlight language="config">
       ProtocolEcho On
+    </highlight>
     </example>
 </usage>
 
index 7a48c9061fbfc8f2b34c1ae9413d55bbac9bfd48..51d4f2eb1a5d9657ad4c6504eb39a83b7503c301 100644 (file)
@@ -56,7 +56,9 @@ SSI pages</description>
     <program>httpd</program> process.</p>
 
     <example><title>Example</title>
+    <highlight language="config">
       PassEnv LD_LIBRARY_PATH
+      </highlight>
     </example>
 </usage>
 </directivesynopsis>
@@ -74,7 +76,9 @@ SSI pages</description>
     HTTP Server modules, and passed on to CGI scripts and SSI pages.</p>
 
     <example><title>Example</title>
+    <highlight language="config">
       SetEnv SPECIAL_PATH /foo/bin
+      </highlight>
     </example>
 
     <note><p>The internal environment variables set by this directive are set
@@ -104,7 +108,9 @@ SSI pages</description>
     on to CGI scripts and SSI pages.</p>
 
     <example><title>Example</title>
+    <highlight language="config">
       UnsetEnv LD_LIBRARY_PATH
+      </highlight>
     </example>
 </usage>
 </directivesynopsis>
index 94e3cd23be74b7d3c1008920e2a0fcd911ad47dc..36f66a52c70f50ef6c4f7c78d8d81c07b4d3787b 100644 (file)
 
     <p>To activate the example module, include a block similar to
     the following in your <code>httpd.conf</code> file:</p>
-<example>
-   &lt;Location /example-info&gt;<br />
-       SetHandler example-handler<br />
-   &lt;/Location&gt;
-</example>
+<highlight language="config">
+&lt;Location /example-info&gt;
+   SetHandler example-handler
+&lt;/Location&gt;
+</highlight>
 
     <p>As an alternative, you can put the following into a <a
     href="core.html#accessfilename"><code>.htaccess</code></a> file
     and then request the file "test.example" from that location:</p>
-<example>
+<highlight language="config">
    AddHandler example-handler .example
-</example>
+</highlight>
 
     <p>After reloading/restarting your server, you should be able
     to browse to this location and see the brief display mentioned
index 00edb03a7370c01f2130b137820e360c66b87446..40d488ab5272860f4237c79d0ccf97eef0251ae8 100644 (file)
@@ -62,12 +62,10 @@ criteria</description>
     <directive module="mod_expires">ExpiresByType</directive> directives
     can also be defined in a more readable syntax of the form:</p>
 
-    <example>
-      ExpiresDefault "<var>base</var> [plus <var>num</var> <var>type</var>]
-        [<var>num</var> <var>type</var>] ..."<br />
-      ExpiresByType type/encoding "<var>base</var> [plus <var>num</var> <var>type</var>]
-        [<var>num</var> <var>type</var>] ..."
-    </example>
+    <highlight language="config">
+ExpiresDefault "<var>base</var>  [plus <var>num</var> <var>type</var>] [<var>num</var> <var>type</var>] ..."
+ExpiresByType type/encoding "<var>base</var>  [plus <var>num</var> <var>type</var>] [<var>num</var> <var>type</var>] ..."
+    </highlight>
 
     <p>where <var>base</var> is one of:</p>
 
@@ -98,21 +96,19 @@ criteria</description>
     make documents expire 1 month after being accessed, by
     default:</p>
 
-    <example>
-      ExpiresDefault "access plus 1 month"<br />
-      ExpiresDefault "access plus 4 weeks"<br />
-      ExpiresDefault "access plus 30 days"
-    </example>
+    <highlight language="config">
+ExpiresDefault "access plus 1 month"
+ExpiresDefault "access plus 4 weeks"
+ExpiresDefault "access plus 30 days"
+    </highlight>
 
     <p>The expiry time can be fine-tuned by adding several
     '<var>num</var> <var>type</var>' clauses:</p>
 
-    <example>
-      ExpiresByType text/html "access plus 1 month 15
-      days 2 hours"<br />
-      ExpiresByType image/gif "modification plus 5 hours 3
-      minutes"
-    </example>
+    <highlight language="config">
+ExpiresByType text/html "access plus 1 month 15 days 2 hours"
+ExpiresByType image/gif "modification plus 5 hours 3 minutes"
+    </highlight>
 
     <p>Note that if you use a modification date based setting, the
     Expires header will <strong>not</strong> be added to content
@@ -193,13 +189,15 @@ by MIME type</description>
     repeatedly within a relatively short timespan).</p>
 
     <example><title>Example:</title>
-      # enable expirations<br />
-      ExpiresActive On<br />
-      # expire GIF images after a month in the client's cache<br />
-      ExpiresByType image/gif A2592000<br />
-      # HTML documents are good for a week from the<br />
-      # time they were changed<br />
-      ExpiresByType text/html M604800
+    <highlight language="config">
+# enable expirations
+ExpiresActive On
+# expire GIF images after a month in the client's cache
+ExpiresByType image/gif A2592000
+# HTML documents are good for a week from the
+# time they were changed
+ExpiresByType text/html M604800
+      </highlight>
     </example>
 
     <p>Note that this directive only has effect if
index 8a1ea123778fc4381476c3c7ce241948fd6cbbdb..f663e2b4d59bc1693bad4803f620c57045a01188 100644 (file)
@@ -60,30 +60,25 @@ delivery to the client</description>
 <section id="examples"><title>Examples</title>
 
     <section><title>Generating HTML from some other type of response</title>
-      <example>
-        # mod_ext_filter directive to define a filter<br />
-        # to HTML-ize text/c files using the external<br />
-        # program /usr/bin/enscript, with the type of<br />
-        # the result set to text/html<br />
-        ExtFilterDefine c-to-html mode=output \<br />
-        <indent>
-          intype=text/c outtype=text/html \<br />
-          cmd="/usr/bin/enscript --color -W html -Ec -o - -"<br />
-        </indent>
-        <br />
-        &lt;Directory "/export/home/trawick/apacheinst/htdocs/c"&gt;<br />
-        <indent>
-          # core directive to cause the new filter to<br />
-          # be run on output<br />
-          SetOutputFilter c-to-html<br />
-          <br />
-          # mod_mime directive to set the type of .c<br />
-          # files to text/c<br />
-          AddType text/c .c<br />
-          <br />
-        </indent>
-        &lt;/Directory&gt;
-      </example>
+      <highlight language="config">
+# mod_ext_filter directive to define a filter
+# to HTML-ize text/c files using the external
+# program /usr/bin/enscript, with the type of
+# the result set to text/html
+ExtFilterDefine c-to-html mode=output \
+    intype=text/c outtype=text/html \
+    cmd="/usr/bin/enscript --color -W html -Ec -o - -"
+
+&lt;Directory "/export/home/trawick/apacheinst/htdocs/c"&gt;
+    # core directive to cause the new filter to
+    # be run on output
+    SetOutputFilter c-to-html
+    
+    # mod_mime directive to set the type of .c
+    # files to text/c
+    AddType text/c .c
+&lt;/Directory&gt;
+      </highlight>
     </section>
 
     <section><title>Implementing a content encoding filter</title>
@@ -91,116 +86,99 @@ delivery to the client</description>
       Please refer to <module>mod_deflate</module> for a practical
       implementation.</p>
 
-      <example>
-        # mod_ext_filter directive to define the external filter<br />
-        ExtFilterDefine gzip mode=output cmd=/bin/gzip<br />
-        <br />
-        &lt;Location /gzipped&gt;<br />
-        <indent>
-          # core directive to cause the gzip filter to be<br />
-          # run on output<br />
-          SetOutputFilter gzip<br />
-          <br />
-          # mod_header directive to add<br />
-          # "Content-Encoding: gzip" header field<br />
-          Header set Content-Encoding gzip<br />
-        </indent>
-        &lt;/Location&gt;
-      </example>
+      <highlight language="config">
+# mod_ext_filter directive to define the external filter
+ExtFilterDefine gzip mode=output cmd=/bin/gzip
+
+&lt;Location /gzipped&gt;
+    
+    # core directive to cause the gzip filter to be
+    # run on output
+    SetOutputFilter gzip
+    
+    # mod_header directive to add
+    # "Content-Encoding: gzip" header field
+    Header set Content-Encoding gzip
+&lt;/Location&gt;
+      </highlight>
     </section>
 
     <section><title>Slowing down the server</title>
-      <example>
-        # mod_ext_filter directive to define a filter<br />
-        # which runs everything through cat; cat doesn't<br />
-        # modify anything; it just introduces extra pathlength<br />
-        # and consumes more resources<br />
-        ExtFilterDefine slowdown mode=output cmd=/bin/cat \<br />
-        <indent>
-          preservescontentlength<br />
-        </indent>
-        <br />
-        &lt;Location /&gt;<br />
-        <indent>
-          # core directive to cause the slowdown filter to<br />
-          # be run several times on output<br />
-          #<br />
-          SetOutputFilter slowdown;slowdown;slowdown<br />
-        </indent>
-        &lt;/Location&gt;
-      </example>
+      <highlight language="config">
+# mod_ext_filter directive to define a filter
+# which runs everything through cat; cat doesn't
+# modify anything; it just introduces extra pathlength
+# and consumes more resources
+ExtFilterDefine slowdown mode=output cmd=/bin/cat \
+    preservescontentlength
+
+&lt;Location /&gt;
+    # core directive to cause the slowdown filter to
+    # be run several times on output
+    #
+    SetOutputFilter slowdown;slowdown;slowdown
+&lt;/Location&gt;
+      </highlight>
     </section>
 
     <section><title>Using sed to replace text in the response</title>
-      <example>
-        # mod_ext_filter directive to define a filter which<br />
-        # replaces text in the response<br />
-        #<br />
-        ExtFilterDefine fixtext mode=output intype=text/html \<br />
-        <indent>
-          cmd="/bin/sed s/verdana/arial/g"<br />
-        </indent>
-        <br />
-        &lt;Location /&gt;<br />
-        <indent>
-          # core directive to cause the fixtext filter to<br />
-          # be run on output<br />
-          SetOutputFilter fixtext<br />
-        </indent>
-        &lt;/Location&gt;
-      </example>
+      <highlight language="config">
+# mod_ext_filter directive to define a filter which
+# replaces text in the response
+#
+ExtFilterDefine fixtext mode=output intype=text/html \
+    cmd="/bin/sed s/verdana/arial/g"
+
+&lt;Location /&gt;
+    # core directive to cause the fixtext filter to
+    # be run on output
+    SetOutputFilter fixtext
+&lt;/Location&gt;
+      </highlight>
     </section>
 
     <section><title>Tracing another filter</title>
-      <example>
-        # Trace the data read and written by mod_deflate<br />
-        # for a particular client (IP 192.168.1.31)<br />
-        # experiencing compression problems.<br />
-        # This filter will trace what goes into mod_deflate.<br />
-        ExtFilterDefine tracebefore \<br />
-        <indent>
-          cmd="/bin/tracefilter.pl /tmp/tracebefore" \<br />
-          EnableEnv=trace_this_client<br />
-        </indent>
-        <br />
-        # This filter will trace what goes after mod_deflate.<br />
-        # Note that without the ftype parameter, the default<br />
-        # filter type of AP_FTYPE_RESOURCE would cause the<br />
-        # filter to be placed *before* mod_deflate in the filter<br />
-        # chain.  Giving it a numeric value slightly higher than<br />
-        # AP_FTYPE_CONTENT_SET will ensure that it is placed<br />
-        # after mod_deflate.<br />
-        ExtFilterDefine traceafter \<br />
-        <indent>
-          cmd="/bin/tracefilter.pl /tmp/traceafter" \<br />
-          EnableEnv=trace_this_client ftype=21<br />
-        </indent>
-        <br />
-        &lt;Directory /usr/local/docs&gt;<br />
-        <indent>
-          SetEnvIf Remote_Addr 192.168.1.31 trace_this_client<br />
-          SetOutputFilter tracebefore;deflate;traceafter<br />
-        </indent>
-        &lt;/Directory&gt;
-      </example>
+      <highlight language="config">
+# Trace the data read and written by mod_deflate
+# for a particular client (IP 192.168.1.31)
+# experiencing compression problems.
+# This filter will trace what goes into mod_deflate.
+ExtFilterDefine tracebefore \
+    cmd="/bin/tracefilter.pl /tmp/tracebefore" \
+    EnableEnv=trace_this_client
+
+# This filter will trace what goes after mod_deflate.
+# Note that without the ftype parameter, the default
+# filter type of AP_FTYPE_RESOURCE would cause the
+# filter to be placed *before* mod_deflate in the filter
+# chain.  Giving it a numeric value slightly higher than
+# AP_FTYPE_CONTENT_SET will ensure that it is placed
+# after mod_deflate.
+ExtFilterDefine traceafter \
+    cmd="/bin/tracefilter.pl /tmp/traceafter" \
+    EnableEnv=trace_this_client ftype=21
+
+&lt;Directory /usr/local/docs&gt;
+    SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
+    SetOutputFilter tracebefore;deflate;traceafter
+&lt;/Directory&gt;
+      </highlight>
 
       <example><title>Here is the filter which traces the data:</title>
-        #!/usr/local/bin/perl -w<br />
-        use strict;<br />
-        <br />
-        open(SAVE, "&gt;$ARGV[0]")<br />
-        <indent>
-          or die "can't open $ARGV[0]: $?";<br />
-        </indent>
-        <br />
-        while (&lt;STDIN&gt;) {<br />
-        <indent>
-          print SAVE $_;<br />
-          print $_;<br />
-        </indent>
-        }<br />
-        <br />
-        close(SAVE);
+      <highlight language="perl">
+#!/usr/local/bin/perl -w
+use strict;
+
+open(SAVE, "&gt;$ARGV[0]")
+    or die "can't open $ARGV[0]: $?";
+
+while (&lt;STDIN&gt;) {
+    print SAVE $_;
+    print $_;
+}
+
+close(SAVE);
+        </highlight>
       </example>
     </section>
 </section> <!-- /Examples -->
@@ -326,9 +304,9 @@ delivery to the client</description>
       filter is removed and the request continues without it.</dd>
     </dl>
 
-    <example><title>Example</title>
+    <highlight language="config">
       ExtFilterOptions LogStderr
-    </example>
+    </highlight>
 
     <p>Messages written to the filter's standard error will be stored
     in the Apache error log.</p>