]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Syntax updates for mod_s*.xml (sans mod_ssl.xml)
authorDaniel Gruno <humbedooh@apache.org>
Fri, 27 Apr 2012 05:42:24 +0000 (05:42 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Fri, 27 Apr 2012 05:42:24 +0000 (05:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331227 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_sed.xml
docs/manual/mod/mod_session.xml
docs/manual/mod/mod_session_cookie.xml
docs/manual/mod/mod_session_crypto.xml
docs/manual/mod/mod_session_dbd.xml
docs/manual/mod/mod_setenvif.xml
docs/manual/mod/mod_so.xml
docs/manual/mod/mod_status.xml
docs/manual/mod/mod_substitute.xml
docs/manual/mod/mod_suexec.xml

index 1a0c991ec27d0e9c1ca1d60a4bcfb318c3bd15b2..639a909d5e2d82772a07993e8c10be9bdb15f491 100644 (file)
@@ -62,33 +62,29 @@ the author's blog</a>.</p>
 
 <section id="sampleconf"><title>Sample Configuration</title>
     <example><title>Adding an output filter </title>
-         # In the following example, the sed filter will change the string<br />
-         # "monday" to "MON" and the string "sunday" to SUN in html documents<br />
-         # before sending to the client.<br />
-        <indent>
-        &lt;Directory "/var/www/docs/sed"&gt; <br />
-           <indent>
-           AddOutputFilter Sed html <br />
-           OutputSed "s/monday/MON/g" <br />
-           OutputSed "s/sunday/SUN/g" <br />
-           </indent>
-        &lt;/Directory&gt; <br />
-        </indent>
+    <highlight language="config">
+# In the following example, the sed filter will change the string
+# "monday" to "MON" and the string "sunday" to SUN in html documents
+# before sending to the client.
+&lt;Directory "/var/www/docs/sed"&gt; 
+    AddOutputFilter Sed html 
+    OutputSed "s/monday/MON/g" 
+    OutputSed "s/sunday/SUN/g" 
+&lt;/Directory&gt; 
+    </highlight>
     </example>
 
     <example><title>Adding an input filter </title>
-         # In the following example, the sed filter will change the string<br />
-         # "monday" to "MON" and the string "sunday" to SUN in the POST data<br />
-         # sent to PHP.<br />
-        <indent>
-        &lt;Directory "/var/www/docs/sed"&gt; <br />
-           <indent>
-           AddInputFilter Sed php <br />
-           InputSed "s/monday/MON/g" <br />
-           InputSed "s/sunday/SUN/g" <br />
-           </indent>
-        &lt;/Directory&gt; <br />
-        </indent>
+    <highlight language="config">
+# In the following example, the sed filter will change the string
+# "monday" to "MON" and the string "sunday" to SUN in the POST data
+# sent to PHP.
+&lt;Directory "/var/www/docs/sed"&gt; 
+    AddInputFilter Sed php 
+    InputSed "s/monday/MON/g" 
+    InputSed "s/sunday/SUN/g" 
+&lt;/Directory&gt; 
+        </highlight>
     </example>
 </section>
 <section id="sed_commands"><title>Sed Commands</title>
index 32c7c4fae66c1ef3ef5261e20209d4b620dcd50c..963c0f0ccb2abd814c50d930c439fe3c17413c7c 100644 (file)
       stored on the browser, in a cookie called <code>session</code>.</p>
 
       <example><title>Browser based session</title>
-        Session On<br />
-        SessionCookieName session path=/<br />
+      <highlight language="config">
+Session On
+SessionCookieName session path=/
+        </highlight>
       </example>
 
       <p>The session is not useful unless it can be written to or read from. The
       <code>X-Replace-Session</code>.</p>
 
       <example><title>Writing to a session</title>
-        Session On<br />
-        SessionCookieName session path=/<br />
-        SessionHeader X-Replace-Session<br />
+      <highlight language="config">
+Session On
+SessionCookieName session path=/
+SessionHeader X-Replace-Session
+        </highlight>
       </example>
 
       <p>The header should contain name value pairs expressed in the same format
       empty string has the effect of removing that key from the session.</p>
 
       <example><title>CGI to write to a session</title>
-        #!/bin/bash<br />
-        echo "Content-Type: text/plain"<br />
-        echo "X-Replace-Session: key1=foo&amp;key2=&amp;key3=bar"<br />
-        echo<br />
-        env<br />
+      <highlight language="sh">
+#!/bin/bash
+echo "Content-Type: text/plain"
+echo "X-Replace-Session: key1=foo&amp;key2=&amp;key3=bar"
+echo
+env
+        </highlight>
       </example>
 
       <p>If configured, the session can be read back from the HTTP_SESSION
       <directive module="mod_session">SessionEnv</directive> directive.</p>
 
       <example><title>Read from a session</title>
-        Session On<br />
-        SessionEnv On<br />
-        SessionCookieName session path=/<br />
-        SessionHeader X-Replace-Session<br />
+      <highlight language="config">
+Session On
+SessionEnv On
+SessionCookieName session path=/
+SessionHeader X-Replace-Session
+        </highlight>
       </example>
 
       <p>Once read, the CGI variable <code>HTTP_SESSION</code> should contain
       module.</p>
 
       <example><title>Browser based encrypted session</title>
-        Session On<br />
-        SessionCryptoPassphrase secret<br />
-        SessionCookieName session path=/<br />
+      <highlight language="config">
+Session On
+SessionCryptoPassphrase secret
+SessionCookieName session path=/
+        </highlight>
       </example>
 
       <p>The session will be automatically decrypted on load, and encrypted on
       as in the example below.</p>
 
       <example><title>Setting cookie parameters</title>
-        Session On<br />
-        SessionCryptoPassphrase secret<br />
-        SessionCookieName session path=/private;domain=example.com;httponly;secure;<br />
+      <highlight language="config">
+Session On
+SessionCryptoPassphrase secret
+SessionCookieName session path=/private;domain=example.com;httponly;secure;
+        </highlight>
       </example>
 
       <p>In cases where the Apache server forms the frontend for backend origin servers,
       the session.</p>
 
       <example><title>Form based authentication</title>
-        Session On<br />
-        SessionCryptoPassphrase secret<br />
-        SessionCookieName session path=/<br />
-        AuthFormProvider file<br />
-        AuthUserFile conf/passwd<br />
-        AuthType form<br />
-        AuthName realm<br />
-        ...<br />
+      <highlight language="config">
+Session On
+SessionCryptoPassphrase secret
+SessionCookieName session path=/
+AuthFormProvider file
+AuthUserFile conf/passwd
+AuthType form
+AuthName realm
+#...
+        </highlight>
       </example>
 
       <p>See the <module>mod_auth_form</module> module for documentation and complete
index 5eadd4ffdb276d1b4292acca0eaefdd2d9c4b562..39a86b531c75c1b2ead2e819e1086499ab99f95b 100644 (file)
       <var>session</var>, configure the session as follows:</p>
 
       <example><title>Browser based session</title>
-        Session On<br />
-        SessionCookieName session path=/<br />
+      <highlight language="config">
+Session On
+SessionCookieName session path=/
+        </highlight>
       </example>
 
       <p>For more examples on how the session can be configured to be read
     </p>
 
     <example><title>Cookie with attributes</title>
-      Session On<br />
-      SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1;<br />
+    <highlight language="config">
+Session On
+SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1;
+      </highlight>
     </example>
 
 </usage>
     </p>
 
     <example><title>Cookie2 with attributes</title>
-      Session On<br />
-      SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;<br />
+    <highlight language="config">
+Session On
+SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
+    </highlight>
     </example>
 
 </usage>
index 0edfd96fea9c125e7b3bf446dc591c3aa38002d1..1277dc75548d26bbf50bf0536e1d690985c8b687 100644 (file)
       <var>session</var>, configure the session as follows:</p>
 
       <example><title>Browser based encrypted session</title>
-        Session On<br />
-        SessionCookieName session path=/<br />
-        SessionCryptoPassphrase secret
+      <highlight language="config">
+Session On
+SessionCookieName session path=/
+SessionCryptoPassphrase secret
+    </highlight>
       </example>
 
       <p>The session will be encrypted with the given key. Different servers can
     which are specified as parameters with optional values after the driver name.</p>
 
     <example><title>NSS without a certificate database</title>
+    <highlight language="config">
       SessionCryptoDriver nss
+      </highlight>
     </example>
 
     <example><title>NSS with certificate database</title>
+    <highlight language="config">
       SessionCryptoDriver nss dir=certs
+      </highlight>
     </example>
 
     <example><title>NSS with certificate database and parameters</title>
+    <highlight language="config">
       SessionCryptoDriver nss dir=certs key3=key3.db cert7=cert7.db secmod=secmod
+      </highlight>
     </example>
 
     <example><title>NSS with paths containing spaces</title>
+    <highlight language="config">
       SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod
+      </highlight>
     </example>
 
     <p>The <var>NSS</var> crypto driver might have already been configured by another
     To avoid this warning, use the noinit parameter as follows.</p>
 
     <example><title>NSS with certificate database</title>
+    <highlight language="config">
       SessionCryptoDriver nss noinit
+      </highlight>
     </example>
 
     <p>To prevent confusion, ensure that all modules requiring NSS are configured with
     the engine to be used for encryption.</p>
 
     <example><title>OpenSSL with engine support</title>
+    <highlight language="config">
       SessionCryptoDriver openssl engine=name
+      </highlight>
     </example>
 
 </usage>
index b1663ed66abcbf4d70ad34d665e3ccb36f23974c..88cb809f3fd40035c1d2db002d1962e951f02860 100644 (file)
       session. These queries are configured as per the example below.</p>
 
       <example><title>Sample DBD configuration</title>
-        DBDriver pgsql<br />
-        DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost"<br />
-        DBDPrepareSQL "delete from session where key = %s" deletesession<br />
-        DBDPrepareSQL "update session set value = %s, expiry = %lld where key = %s" updatesession<br />
-        DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession<br />
-        DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry &gt; %lld)" selectsession<br />
-        DBDPrepareSQL "delete from session where expiry != 0 and expiry &lt; %lld" cleansession<br />
+      <highlight language="config">
+DBDriver pgsql
+DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost"
+DBDPrepareSQL "delete from session where key = %s" deletesession
+DBDPrepareSQL "update session set value = %s, expiry = %lld where key = %s" updatesession
+DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession
+DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry &gt; %lld)" selectsession
+DBDPrepareSQL "delete from session where expiry != 0 and expiry &lt; %lld" cleansession
+    </highlight>
       </example>
 
     </section>
       called <var>session</var>, configure the session as follows:</p>
 
       <example><title>SQL based anonymous session</title>
-        Session On<br />
-        SessionDBDCookieName session path=/<br />
+      <highlight language="config">
+Session On
+SessionDBDCookieName session path=/
+        </highlight>
       </example>
 
       <p>For more examples on how the session can be configured to be read
       userid, configure the session as follows:</p>
 
       <example><title>SQL based per user session</title>
-        Session On<br />
-        SessionDBDPerUser On<br />
+      <highlight language="config">
+Session On
+SessionDBDPerUser On
+        </highlight>
       </example>
 
     </section>
     </p>
 
     <example><title>Cookie with attributes</title>
-      Session On<br />
-      SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1;<br />
+    <highlight language="config">
+Session On
+SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1;
+      </highlight>
     </example>
 
 </usage>
     </p>
 
     <example><title>Cookie2 with attributes</title>
-      Session On<br />
-      SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;<br />
+    <highlight language="config">
+Session On
+SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
+      </highlight>
     </example>
 
 </usage>
index 9ff7ff404e829a93389eb6af53c9d6d473e4190c..a41641794e11eb9777b48e631fad4b93d7bbad1b 100644 (file)
@@ -44,10 +44,10 @@ on characteristics of the request</description>
     such as this example, which sets <code>netscape</code> if the
     browser is mozilla but not MSIE.</p>
 
-<example>
-  BrowserMatch ^Mozilla netscape<br />
-  BrowserMatch MSIE !netscape<br />
-</example>
+<highlight language="config">
+BrowserMatch ^Mozilla netscape
+BrowserMatch MSIE !netscape
+</highlight>
 </summary>
 
 <seealso><a href="../env.html">Environment Variables in Apache HTTP Server</a></seealso>
@@ -69,17 +69,17 @@ on characteristics of the request</description>
   sets environment variables conditional on the
   <code>User-Agent</code> HTTP request header.  The following two
   lines have the same effect:</p>
-<example>
-   BrowserMatchNoCase Robot is_a_robot<br />
-   SetEnvIfNoCase User-Agent Robot is_a_robot<br />
-</example>
+<highlight language="config">
+BrowserMatchNoCase Robot is_a_robot
+SetEnvIfNoCase User-Agent Robot is_a_robot
+</highlight>
 
     <p>Some additional examples:</p>
-<example>
-    BrowserMatch ^Mozilla forms jpeg=yes browser=netscape<br />
-    BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript<br />
-    BrowserMatch MSIE !javascript<br />
-</example>
+<highlight language="config">
+BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
+BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
+BrowserMatch MSIE !javascript
+</highlight>
 </usage>
 </directivesynopsis>
 
@@ -101,20 +101,20 @@ respect to case</description>
     module="mod_setenvif">BrowserMatch</directive> directive.
     However, it provides for case-insensitive matching. For
     example:</p>
-<example>
-    BrowserMatchNoCase mac platform=macintosh<br />
-    BrowserMatchNoCase win platform=windows<br />
-</example>
+<highlight language="config">
+BrowserMatchNoCase mac platform=macintosh
+BrowserMatchNoCase win platform=windows
+</highlight>
 
     <p>The <directive>BrowserMatch</directive> and
     <directive>BrowserMatchNoCase</directive> directives are special cases of
     the <directive module="mod_setenvif">SetEnvIf</directive> and <directive
     module="mod_setenvif">SetEnvIfNoCase</directive>
     directives. The following two lines have the same effect:</p>
-<example>
-   BrowserMatchNoCase Robot is_a_robot<br />
-   SetEnvIfNoCase User-Agent Robot is_a_robot<br />
-</example>
+<highlight language="config">
+BrowserMatchNoCase Robot is_a_robot
+SetEnvIfNoCase User-Agent Robot is_a_robot
+</highlight>
 </usage>
 </directivesynopsis>
 
@@ -211,18 +211,17 @@ of</p>
     <var>value</var> and replace them by parenthesized subexpressions
     of <var>regex</var>.</p>
 
-<example>
-<title>Example:</title>
-   SetEnvIf Request_URI "\.gif$" object_is_image=gif<br />
-   SetEnvIf Request_URI "\.jpg$" object_is_image=jpg<br />
-   SetEnvIf Request_URI "\.xbm$" object_is_image=xbm<br />
-        :<br />
-   SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral<br />
-        :<br />
-   SetEnvIf object_is_image xbm XBIT_PROCESSING=1<br />
-        :<br />
-   SetEnvIf ^TS  ^[a-z]  HAVE_TS<br />
-</example>
+<highlight language="config">
+SetEnvIf Request_URI "\.gif$" object_is_image=gif
+SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
+SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
+    
+SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral
+    
+SetEnvIf object_is_image xbm XBIT_PROCESSING=1
+    
+SetEnvIf ^TS  ^[a-z]  HAVE_TS
+</highlight>
 
     <p>The first three will set the environment variable
     <code>object_is_image</code> if the request was for an image
@@ -261,9 +260,9 @@ for additional examples.
     and applied <em>env-variable</em> in the same fashion as <directive
     >SetEnvIf</directive>.</p>
 
-<example>
+<highlight language="config">
     SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered
-</example>
+</highlight>
 
     <p>This would set the environment variable <code>iso_delivered</code>
     every time our application attempts to send it via <code>X-Sendfile</code></p>
@@ -271,9 +270,9 @@ for additional examples.
     <p>A more useful example would be to set the variable rfc1918 if the
     remote IP address is a private address according to RFC 1918:</p>
 
-<example>
+<highlight language="config">
     SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918
-</example>
+</highlight>
 </usage>
 
 <seealso><a href="../expr.html">Expressions in Apache HTTP Server</a>,
@@ -301,9 +300,9 @@ without respect to case</description>
     the <directive module="mod_setenvif">SetEnvIf</directive> directive,
     and differs only in that the regular expression matching is
     performed in a case-insensitive manner. For example:</p>
-<example>
+<highlight language="config">
    SetEnvIfNoCase Host Example\.Org site=example
-</example>
+</highlight>
 
     <p>This will cause the <code>site</code> environment variable
     to be set to "<code>example</code>" if the HTTP request header
index cef79cb8dade65fcdc59264304cefde271e11bf3..045cab339522ccc930fb631661fea789ad40855f 100644 (file)
@@ -144,7 +144,7 @@ Windows</compatibility>
 
     <p>For example:</p>
 
-    <example>LoadFile libexec/libxmlparse.so</example>
+    <highlight language="config">LoadFile libexec/libxmlparse.so</highlight>
 
 </usage>
 </directivesynopsis>
@@ -167,9 +167,9 @@ of active modules</description>
     href="module-dict.html#ModuleIdentifier">Module Identifier</a>
     in the module documentation. Example:</p>
 
-    <example>
+    <highlight language="config">
       LoadModule status_module modules/mod_status.so
-    </example>
+    </highlight>
 
     <p>loads the named module from the modules subdirectory of the
     ServerRoot.</p>
index 20c7cc904995e0aa4e1e441c2600f02bfb17ec56..12e94927b149e8879589a2073b109030f0a7d99d 100644 (file)
@@ -77,15 +77,12 @@ performance</description>
     <p>To enable status reports only for browsers from the example.com
     domain add this code to your <code>httpd.conf</code>
     configuration file</p>
-<example>
-    &lt;Location /server-status&gt;<br />
-    <indent>
-    SetHandler server-status<br />
-<br />
-    Require host example.com<br />
-    </indent>
-    &lt;/Location&gt;
-</example>
+<highlight language="config">
+&lt;Location /server-status&gt;
+    SetHandler server-status
+    Require host example.com
+&lt;/Location&gt;
+</highlight>
 
     <p>You can now access server statistics by using a Web browser
     to access the page
index 0e0ab41e48e44bad3ad3bfec520ea73095dc9c62..3c275decad598cced30adfa75bd590db7915dacb 100644 (file)
     </dl>
 
     <example><title>Example</title>
-        &lt;Location /&gt;
-        <indent>
-            AddOutputFilterByType SUBSTITUTE text/html<br />
-            Substitute s/foo/bar/ni<br />
-        </indent>
-        &lt;/Location&gt;
+    <highlight language="config">
+&lt;Location /&gt;
+    AddOutputFilterByType SUBSTITUTE text/html
+    Substitute s/foo/bar/ni
+&lt;/Location&gt;
+        </highlight>
     </example>
 
     <p>If either the pattern or the substitution contain a slash
     character then an alternative delimiter should be used:</p>
 
     <example><title>Example of using an alternate delimiter</title>
-        &lt;Location /&gt;
-        <indent>
-            AddOutputFilterByType SUBSTITUTE text/html<br />
-            Substitute "s|&lt;BR */?&gt;|&lt;br /&gt;|i"
-        </indent>
-        &lt;/Location&gt;
+    <highlight language="config">
+&lt;Location /&gt;
+    AddOutputFilterByType SUBSTITUTE text/html
+    Substitute "s|&lt;BR */?&gt;|&lt;br /&gt;|i"
+&lt;/Location&gt;
+        </highlight>
     </example>
 
     <p>Backreferences can be used in the comparison and in the substitution,
     when regular expressions are used, as illustrated in the following example: </p>
     <example><title>Example of using backreferences and captures</title>
-        &lt;Location /&gt;
-        <indent>
-            AddOutputFilterByType SUBSTITUTE text/html<br />
-            # "foo=k,bar=k" -> "foo/bar=k" <br />
-            Substitute "s|foo=(\w+),bar=\1|foo/bar=$1"
-        </indent>
-        &lt;/Location&gt;
+    <highlight language="config">
+&lt;Location /&gt;
+    AddOutputFilterByType SUBSTITUTE text/html
+    # "foo=k,bar=k" -> "foo/bar=k" 
+    Substitute "s|foo=(\w+),bar=\1|foo/bar=$1"
+&lt;/Location&gt;
+    </highlight>
     </example>
 
     <p>A common use scenario for <code>mod_substitute</code> is the
     those URLs into something that will work from the front end:</p>
 
     <example><title>Rewriting URLs embedded in proxied content</title>
-    ProxyPass /blog/ http://internal.blog.example.com<br />
-    ProxyPassReverse /blog/ http://internal.blog.example.com/<br />
-    <br />
-    Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"
+    <highlight language="config">
+ProxyPass /blog/ http://internal.blog.example.com
+ProxyPassReverse /blog/ http://internal.blog.example.com/
+
+Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"
+    </highlight>
     </example>
 
     <p><directive module="mod_proxy">ProxyPassReverse</directive>
index f2d3ce0d788fa25922ae43d3c80d84cd135fc651..2a8232b25cdbb6db382fc6fb4e13056c85fb1b67 100644 (file)
@@ -57,7 +57,9 @@ later.</compatibility>
 
     <example>
     <title>Example</title>
+    <highlight language="config">
     SuexecUserGroup nobody nogroup
+    </highlight>
     </example>
 
     <p>In Apache httpd 2.3.9 and later, startup will fail if this