]> granicus.if.org Git - apache/commitdiff
Add highlighting for howto/
authorDaniel Gruno <humbedooh@apache.org>
Wed, 25 Apr 2012 13:11:40 +0000 (13:11 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Wed, 25 Apr 2012 13:11:40 +0000 (13:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1330260 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/howto/access.html.en
docs/manual/howto/access.xml
docs/manual/howto/auth.html.en
docs/manual/howto/auth.xml
docs/manual/howto/cgi.html.fr
docs/manual/howto/htaccess.html.en
docs/manual/howto/htaccess.xml
docs/manual/howto/public_html.html.en
docs/manual/howto/public_html.xml
docs/manual/howto/ssi.html.en
docs/manual/howto/ssi.xml

index 24c14ff7faf48e99276402bbb6a590e5087b34e3..154821d0d2a9fcee5decbe5b1d7a9289d5567131 100644 (file)
 
     <p>The usage of these directives is:</p>
 
-    <div class="example"><p><code>
-      Require host <var>address</var><br />
+    <pre class="prettyprint lang-config">
+      Require host <var>address</var>
       Require ip <var>ip.address</var>
-    </code></p></div>
+    </pre>
+
 
     <p>In the first form, <var>address</var> is a fully qualified
     domain name (or a partial domain name); you may provide multiple
     <p>And, if you'd like to block access from an entire domain,
     you can specify just part of an address or domain name:</p>
 
-    <div class="example"><p><code>
-      Require not ip <var>192.168.205</var><br />
-      Require not host <var>phishers.example.com</var> <var>moreidiots.example</var><br />
+    <pre class="prettyprint lang-config">
+      Require not ip <var>192.168.205</var>
+      Require not host <var>phishers.example.com</var> <var>moreidiots.example</var>
       Require not gov
-    </code></p></div>
+    </pre>
+
 
     <p>Use of the <code class="directive"><a href="../mod/mod_authz_core.html#requireall">RequireAll</a></code>, <code class="directive"><a href="../mod/mod_authz_core.html#requireany">RequireAny</a></code>, and <code class="directive"><a href="../mod/mod_authz_core.html#requirenone">RequireNone</a></code> directives may be
     used to enforce more complex sets of requirements.</p>
     based on user-agent (the browser type) you might do the
     following:</p>
 
-    <div class="example"><p><code>
-    &lt;If "%{HTTP_USER_AGENT} = 'BadBot'"&gt;<br />
-    <span class="indent">
-        Require All Denied<br />
-    </span>
+    <pre class="prettyprint lang-config">
+    &lt;If "%{HTTP_USER_AGENT} = 'BadBot'"&gt;
+        Require All Denied
     &lt;/If&gt;
-    </code></p></div>
+    </pre>
+
 
     <div class="note"><h3>Warning:</h3>
     <p>Access control by <code>User-Agent</code> is an unreliable technique,
     <p>For example, if you wish to block access to a resource between 8pm
     and 6am, you can do this using <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>.</p>
 
-    <div class="example"><p><code>
-    RewriteEngine On<br />
-    RewriteCond %{TIME_HOUR} &gt;20 [OR]<br />
-    RewriteCond %{TIME_HOUR} &lt;07<br />
+    <pre class="prettyprint lang-config">
+    RewriteEngine On
+    RewriteCond %{TIME_HOUR} &gt;20 [OR]
+    RewriteCond %{TIME_HOUR} &lt;07
     RewriteRule ^/fridge - [F]
-    </code></p></div>
+    </pre>
+
 
     <p>This will return a 403 Forbidden response for any request after 8pm
     or before 7am. This technique can be used for any criteria that you wish
index fe386be2aaa268c1858325335547d76335467c8d..62ffd60075839555509fe7704154b57bddaa6775 100644 (file)
 
     <p>The usage of these directives is:</p>
 
-    <example>
-      Require host <var>address</var><br />
+    <highlight language="config">
+      Require host <var>address</var>
       Require ip <var>ip.address</var>
-    </example>
+    </highlight>
 
     <p>In the first form, <var>address</var> is a fully qualified
     domain name (or a partial domain name); you may provide multiple
     <p>And, if you'd like to block access from an entire domain,
     you can specify just part of an address or domain name:</p>
 
-    <example>
-      Require not ip <var>192.168.205</var><br />
-      Require not host <var>phishers.example.com</var> <var>moreidiots.example</var><br />
+    <highlight language="config">
+      Require not ip <var>192.168.205</var>
+      Require not host <var>phishers.example.com</var> <var>moreidiots.example</var>
       Require not gov
-    </example>
+    </highlight>
 
     <p>Use of the <directive
     module="mod_authz_core">RequireAll</directive>, <directive
     based on user-agent (the browser type) you might do the
     following:</p>
 
-    <example>
-    &lt;If "%{HTTP_USER_AGENT} = 'BadBot'"&gt;<br />
-    <indent>
-        Require All Denied<br />
-    </indent>
+    <highlight language="config">
+    &lt;If "%{HTTP_USER_AGENT} = 'BadBot'"&gt;
+        Require All Denied
     &lt;/If&gt;
-    </example>
+    </highlight>
 
     <note><title>Warning:</title>
     <p>Access control by <code>User-Agent</code> is an unreliable technique,
     <p>For example, if you wish to block access to a resource between 8pm
     and 6am, you can do this using <module>mod_rewrite</module>.</p>
 
-    <example>
-    RewriteEngine On<br />
-    RewriteCond %{TIME_HOUR} &gt;20 [OR]<br />
-    RewriteCond %{TIME_HOUR} &lt;07<br />
+    <highlight language="config">
+    RewriteEngine On
+    RewriteCond %{TIME_HOUR} &gt;20 [OR]
+    RewriteCond %{TIME_HOUR} &lt;07
     RewriteRule ^/fridge - [F]
-    </example>
+    </highlight>
 
     <p>This will return a 403 Forbidden response for any request after 8pm
     or before 7am. This technique can be used for any criteria that you wish
index c069f5c898dbefed4b556acde9b6f4a5a56605b2..21aa5daea40a85f1a8122a5b8742fab3f2177f24 100644 (file)
@@ -142,9 +142,10 @@ module from each group.</p>
     an <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> directive like the
     following:</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
       AllowOverride AuthConfig
-    </code></p></div>
+    </pre>
+
 
     <p>Or, if you are just going to put the directives directly in
     your main server configuration file, you will of course need to
@@ -216,14 +217,15 @@ module from each group.</p>
     placed in <code>httpd.conf</code> inside a &lt;Directory
     /usr/local/apache/htdocs/secret&gt; section.</p>
 
-    <div class="example"><p><code>
-      AuthType Basic<br />
-      AuthName "Restricted Files"<br />
-      # (Following line optional)<br />
-      AuthBasicProvider file<br />
-      AuthUserFile /usr/local/apache/passwd/passwords<br />
+    <pre class="prettyprint lang-config">
+      AuthType Basic
+      AuthName "Restricted Files"
+      # (Following line optional)
+      AuthBasicProvider file
+      AuthUserFile /usr/local/apache/passwd/passwords
       Require user rbowen
-    </code></p></div>
+    </pre>
+
 
     <p>Let's examine each of those directives individually. The <code class="directive"><a href="../mod/mod_authn_core.html#authtype">AuthType</a></code> directive selects
     that method that is used to authenticate the user. The most
@@ -313,15 +315,16 @@ person in</a></h2>
     <p>Now, you need to modify your <code>.htaccess</code> file to
     look like the following:</p>
 
-    <div class="example"><p><code>
-      AuthType Basic<br />
-      AuthName "By Invitation Only"<br />
-      # Optional line:<br />
-      AuthBasicProvider file<br />
-      AuthUserFile /usr/local/apache/passwd/passwords<br />
-      AuthGroupFile /usr/local/apache/passwd/groups<br />
+    <pre class="prettyprint lang-config">
+      AuthType Basic
+      AuthName "By Invitation Only"
+      # Optional line:
+      AuthBasicProvider file
+      AuthUserFile /usr/local/apache/passwd/passwords
+      AuthGroupFile /usr/local/apache/passwd/groups
       Require group GroupName
-    </code></p></div>
+    </pre>
+
 
     <p>Now, anyone that is listed in the group <code>GroupName</code>,
     and has an entry in the <code>password</code> file, will be let in, if
@@ -379,17 +382,16 @@ person in</a></h2>
 
     <p>To select a dbd file rather than a text file, for example:</p>
 
-    <div class="example"><p><code>
-    &lt;Directory /www/docs/private&gt;<br />
-    <span class="indent">
-    AuthName "Private"<br />
-    AuthType Basic<br />
-    AuthBasicProvider dbm<br />
-    AuthDBMUserFile /www/passwords/passwd.dbm<br />
-    Require valid-user<br />
-    </span>
+    <pre class="prettyprint lang-config">
+    &lt;Directory /www/docs/private&gt;
+        AuthName "Private"
+        AuthType Basic
+        AuthBasicProvider dbm
+        AuthDBMUserFile /www/passwords/passwd.dbm
+        Require valid-user
     &lt;/Directory&gt;
-    </code></p></div>
+    </pre>
+
 
     <p>Other options are available. Consult the
     <code class="module"><a href="../mod/mod_authn_dbm.html">mod_authn_dbm</a></code> documentation for more details.</p>
@@ -404,18 +406,17 @@ person in</a></h2>
     scheme that meets your needs. In the following example, both the
     file and LDAP based authentication providers are being used.</p>
 
-    <div class="example"><p><code>
-    &lt;Directory /www/docs/private&gt;<br />
-    <span class="indent">
-    AuthName "Private"<br />
-    AuthType Basic<br />
-    AuthBasicProvider file ldap<br />
-    AuthUserFile /usr/local/apache/passwd/passwords<br />
-    AuthLDAPURL ldap://ldaphost/o=yourorg<br />
-    Require valid-user<br />
-    </span>
+    <pre class="prettyprint lang-config">
+    &lt;Directory /www/docs/private&gt;
+        AuthName "Private"
+        AuthType Basic
+        AuthBasicProvider file ldap
+        AuthUserFile /usr/local/apache/passwd/passwords
+        AuthLDAPURL ldap://ldaphost/o=yourorg
+        Require valid-user
     &lt;/Directory&gt;
-    </code></p></div>
+    </pre>
+
 
     <p>In this example the file provider will attempt to authenticate
     the user first. If it is unable to authenticate the user, the LDAP
@@ -430,20 +431,19 @@ person in</a></h2>
     authorization methods can also be used. In this example both file group
     authorization as well as LDAP group authorization is being used.</p>
 
-    <div class="example"><p><code>
-    &lt;Directory /www/docs/private&gt;<br />
-    <span class="indent">
-    AuthName "Private"<br />
-    AuthType Basic<br />
-    AuthBasicProvider file<br />
-    AuthUserFile /usr/local/apache/passwd/passwords<br />
-    AuthLDAPURL ldap://ldaphost/o=yourorg
-    AuthGroupFile /usr/local/apache/passwd/groups<br />
-    Require group GroupName<br />
-    Require ldap-group cn=mygroup,o=yourorg<br />
-    </span>
+    <pre class="prettyprint lang-config">
+    &lt;Directory /www/docs/private&gt;
+        AuthName "Private"
+        AuthType Basic
+        AuthBasicProvider file
+        AuthUserFile /usr/local/apache/passwd/passwords
+        AuthLDAPURL ldap://ldaphost/o=yourorg
+        AuthGroupFile /usr/local/apache/passwd/groups
+        Require group GroupName
+        Require ldap-group cn=mygroup,o=yourorg
     &lt;/Directory&gt;
-    </code></p></div>
+    </pre>
+
 
     <p>To take authorization a little further, authorization container
     directives such as
@@ -521,16 +521,18 @@ person in</a></h2>
         that will be called during the authorization stage of the request
         processing. For example:</p>
 
-        <div class="example"><p><code>
+        <pre class="prettyprint lang-config">
           Require ip <var>address</var>
-        </code></p></div>
+        </pre>
+
 
         <p>where <var>address</var> is an IP address (or a partial IP
         address) or:</p>
 
-        <div class="example"><p><code>
+        <pre class="prettyprint lang-config">
           Require host <var>domain_name</var>
-        </code></p></div>
+        </pre>
+
 
         <p>where <var>domain_name</var> is a fully qualified domain name
         (or a partial domain name); you may provide multiple addresses or
@@ -540,45 +542,40 @@ person in</a></h2>
         board, and you want to keep them out, you could do the
         following:</p>
 
-        <div class="example"><p><code>
+        <pre class="prettyprint lang-config">
           &lt;RequireAll&gt;
-          <span class="indent">
-            Require all granted<br />
+            Require all granted
             Require not ip 10.252.46.165
-          </span>
           &lt;/RequireAll&gt;
-        </code></p></div>
+        </pre>
+
 
         <p>Visitors coming from that address will not be able to see
         the content covered by this directive. If, instead, you have a
         machine name, rather than an IP address, you can use that.</p>
 
-        <div class="example"><p><code>
+        <pre class="prettyprint lang-config">
           &lt;RequireAll&gt;
-          <span class="indent">
-            Require all granted<br />
+            Require all granted
             Require not host <var>host.example.com</var>
-          </span>
           &lt;/RequireAll&gt;
-        </code></p></div>
+        </pre>
+
 
         <p>And, if you'd like to block access from an entire domain,
         you can specify just part of an address or domain name:</p>
 
-        <div class="example"><p><code>
-          &lt;RequireAll&gt;
-          <span class="indent">
-            Require all granted<br />
-            &lt;RequireNone&gt;
-            <span class="indent">
-              Require ip 192.168.205<br />
-              Require host phishers.example.com moreidiots.example<br />
-              Require host ke
-            </span>
-            &lt;/RequireNone&gt;
-          </span>
-          &lt;/RequireAll&gt;
-        </code></p></div>
+        <pre class="prettyprint lang-config">
+  &lt;RequireAll&gt;
+    Require all granted
+    &lt;RequireNone&gt;
+      Require ip 192.168.205
+      Require host phishers.example.com moreidiots.example
+      Require host ke
+    &lt;/RequireNone&gt;
+  &lt;/RequireAll&gt;
+        </pre>
+
 
         <p>The above example uses the <code class="directive"><a href="../mod/mod_authz_core.html#requirenone">&lt;RequireNone&gt;</a></code> directive
         to make sure that none of the
index 1c8c019e53c87229e5a39a63d84e024468aad5a4..01e139818c07c124f3cefed8d795325dceed8e09 100644 (file)
@@ -127,9 +127,9 @@ module from each group.</p>
     an <directive module="core">AllowOverride</directive> directive like the
     following:</p>
 
-    <example>
+    <highlight language="config">
       AllowOverride AuthConfig
-    </example>
+    </highlight>
 
     <p>Or, if you are just going to put the directives directly in
     your main server configuration file, you will of course need to
@@ -201,14 +201,14 @@ module from each group.</p>
     placed in <code>httpd.conf</code> inside a &lt;Directory
     /usr/local/apache/htdocs/secret&gt; section.</p>
 
-    <example>
-      AuthType Basic<br />
-      AuthName "Restricted Files"<br />
-      # (Following line optional)<br />
-      AuthBasicProvider file<br />
-      AuthUserFile /usr/local/apache/passwd/passwords<br />
+    <highlight language="config">
+      AuthType Basic
+      AuthName "Restricted Files"
+      # (Following line optional)
+      AuthBasicProvider file
+      AuthUserFile /usr/local/apache/passwd/passwords
       Require user rbowen
-    </example>
+    </highlight>
 
     <p>Let's examine each of those directives individually. The <directive
     module="mod_authn_core">AuthType</directive> directive selects
@@ -305,15 +305,15 @@ person in</title>
     <p>Now, you need to modify your <code>.htaccess</code> file to
     look like the following:</p>
 
-    <example>
-      AuthType Basic<br />
-      AuthName "By Invitation Only"<br />
-      # Optional line:<br />
-      AuthBasicProvider file<br />
-      AuthUserFile /usr/local/apache/passwd/passwords<br />
-      AuthGroupFile /usr/local/apache/passwd/groups<br />
+    <highlight language="config">
+      AuthType Basic
+      AuthName "By Invitation Only"
+      # Optional line:
+      AuthBasicProvider file
+      AuthUserFile /usr/local/apache/passwd/passwords
+      AuthGroupFile /usr/local/apache/passwd/groups
       Require group GroupName
-    </example>
+    </highlight>
 
     <p>Now, anyone that is listed in the group <code>GroupName</code>,
     and has an entry in the <code>password</code> file, will be let in, if
@@ -372,17 +372,15 @@ person in</title>
 
     <p>To select a dbd file rather than a text file, for example:</p>
 
-    <example>
-    &lt;Directory /www/docs/private&gt;<br />
-    <indent>
-    AuthName "Private"<br />
-    AuthType Basic<br />
-    AuthBasicProvider dbm<br />
-    AuthDBMUserFile /www/passwords/passwd.dbm<br />
-    Require valid-user<br />
-    </indent>
+    <highlight language="config">
+    &lt;Directory /www/docs/private&gt;
+        AuthName "Private"
+        AuthType Basic
+        AuthBasicProvider dbm
+        AuthDBMUserFile /www/passwords/passwd.dbm
+        Require valid-user
     &lt;/Directory&gt;
-    </example>
+    </highlight>
 
     <p>Other options are available. Consult the
     <module>mod_authn_dbm</module> documentation for more details.</p>
@@ -397,18 +395,16 @@ person in</title>
     scheme that meets your needs. In the following example, both the
     file and LDAP based authentication providers are being used.</p>
 
-    <example>
-    &lt;Directory /www/docs/private&gt;<br />
-    <indent>
-    AuthName "Private"<br />
-    AuthType Basic<br />
-    AuthBasicProvider file ldap<br />
-    AuthUserFile /usr/local/apache/passwd/passwords<br />
-    AuthLDAPURL ldap://ldaphost/o=yourorg<br />
-    Require valid-user<br />
-    </indent>
+    <highlight language="config">
+    &lt;Directory /www/docs/private&gt;
+        AuthName "Private"
+        AuthType Basic
+        AuthBasicProvider file ldap
+        AuthUserFile /usr/local/apache/passwd/passwords
+        AuthLDAPURL ldap://ldaphost/o=yourorg
+        Require valid-user
     &lt;/Directory&gt;
-    </example>
+    </highlight>
 
     <p>In this example the file provider will attempt to authenticate
     the user first. If it is unable to authenticate the user, the LDAP
@@ -423,20 +419,18 @@ person in</title>
     authorization methods can also be used. In this example both file group
     authorization as well as LDAP group authorization is being used.</p>
 
-    <example>
-    &lt;Directory /www/docs/private&gt;<br />
-    <indent>
-    AuthName "Private"<br />
-    AuthType Basic<br />
-    AuthBasicProvider file<br />
-    AuthUserFile /usr/local/apache/passwd/passwords<br />
-    AuthLDAPURL ldap://ldaphost/o=yourorg
-    AuthGroupFile /usr/local/apache/passwd/groups<br />
-    Require group GroupName<br />
-    Require ldap-group cn=mygroup,o=yourorg<br />
-    </indent>
+    <highlight language="config">
+    &lt;Directory /www/docs/private&gt;
+        AuthName "Private"
+        AuthType Basic
+        AuthBasicProvider file
+        AuthUserFile /usr/local/apache/passwd/passwords
+        AuthLDAPURL ldap://ldaphost/o=yourorg
+        AuthGroupFile /usr/local/apache/passwd/groups
+        Require group GroupName
+        Require ldap-group cn=mygroup,o=yourorg
     &lt;/Directory&gt;
-    </example>
+    </highlight>
 
     <p>To take authorization a little further, authorization container
     directives such as
@@ -514,16 +508,16 @@ person in</title>
         that will be called during the authorization stage of the request
         processing. For example:</p>
 
-        <example>
+        <highlight language="config">
           Require ip <var>address</var>
-        </example>
+        </highlight>
 
         <p>where <var>address</var> is an IP address (or a partial IP
         address) or:</p>
 
-        <example>
+        <highlight language="config">
           Require host <var>domain_name</var>
-        </example>
+        </highlight>
 
         <p>where <var>domain_name</var> is a fully qualified domain name
         (or a partial domain name); you may provide multiple addresses or
@@ -533,45 +527,37 @@ person in</title>
         board, and you want to keep them out, you could do the
         following:</p>
 
-        <example>
+        <highlight language="config">
           &lt;RequireAll&gt;
-          <indent>
-            Require all granted<br/>
+            Require all granted
             Require not ip 10.252.46.165
-          </indent>
           &lt;/RequireAll&gt;
-        </example>
+        </highlight>
 
         <p>Visitors coming from that address will not be able to see
         the content covered by this directive. If, instead, you have a
         machine name, rather than an IP address, you can use that.</p>
 
-        <example>
+        <highlight language="config">
           &lt;RequireAll&gt;
-          <indent>
-            Require all granted<br/>
+            Require all granted
             Require not host <var>host.example.com</var>
-          </indent>
           &lt;/RequireAll&gt;
-        </example>
+        </highlight>
 
         <p>And, if you'd like to block access from an entire domain,
         you can specify just part of an address or domain name:</p>
 
-        <example>
-          &lt;RequireAll&gt;
-          <indent>
-            Require all granted<br/>
-            &lt;RequireNone&gt;
-            <indent>
-              Require ip 192.168.205<br />
-              Require host phishers.example.com moreidiots.example<br />
-              Require host ke
-            </indent>
-            &lt;/RequireNone&gt;
-          </indent>
-          &lt;/RequireAll&gt;
-        </example>
+        <highlight language="config">
+  &lt;RequireAll&gt;
+    Require all granted
+    &lt;RequireNone&gt;
+      Require ip 192.168.205
+      Require host phishers.example.com moreidiots.example
+      Require host ke
+    &lt;/RequireNone&gt;
+  &lt;/RequireAll&gt;
+        </highlight>
 
         <p>The above example uses the <directive module="mod_authz_core"
         type="section">RequireNone</directive> directive
index ca77ea36e0ac7a8d7d7a54e4272209763dae32f8..161c52374056b2b6f39ce9ca76d82afe8e93bc13 100644 (file)
@@ -26,6 +26,8 @@
 <a href="../ja/howto/cgi.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/howto/cgi.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div>
+<div class="outofdate">Cette traduction peut être périmée. Vérifiez la version
+            anglaise pour les changements récents.</div>
 </div>
 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#intro">Introduction</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#configuring">Configurer Apache pour autoriser CGI</a></li>
index 9c86153189245fa7f18ad035604c392b1f3ff3c7..5f1c1719311e2e2abda2568148e751ae2b187977 100644 (file)
@@ -272,19 +272,16 @@ changes on a per-directory basis.</p>
     prevent script execution while allowing anything else to be set in
     <code>.htaccess</code> you can use:</p>
 
-    <div class="example"><p><code>
-&lt;Directory /www/htdocs&gt;<br />
-<span class="indent">
-Allowoverride All<br />
-</span>
-&lt;/Directory&gt;<br />
-<br />
-&lt;Location /&gt;<br />
-<span class="indent">
-Options +IncludesNoExec -ExecCGI<br />
-</span>
+    <pre class="prettyprint lang-config">
+&lt;Directory /www/htdocs&gt;
+    Allowoverride All
+&lt;/Directory&gt;
+
+&lt;Location /&gt;
+    Options +IncludesNoExec -ExecCGI<br />
 &lt;/Location&gt;
-    </code></p></div>
+    </pre>
+
 
     <div class="note">This example assumes that your <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> is <code>/www/htdocs</code>.</div>
 
@@ -310,13 +307,14 @@ Options +IncludesNoExec -ExecCGI<br />
 
     <p><code>.htaccess</code> file contents:</p>
 
-    <div class="example"><p><code>
-      AuthType Basic<br />
-      AuthName "Password Required"<br />
-      AuthUserFile /www/passwords/password.file<br />
-      AuthGroupFile /www/passwords/group.file<br />
+    <pre class="prettyprint lang-config">
+      AuthType Basic
+      AuthName "Password Required"
+      AuthUserFile /www/passwords/password.file
+      AuthGroupFile /www/passwords/group.file
       Require Group admins
-    </code></p></div>
+    </pre>
+
 
     <p>Note that <code>AllowOverride AuthConfig</code> must be in effect
     for these directives to have any effect.</p>
@@ -332,11 +330,12 @@ Options +IncludesNoExec -ExecCGI<br />
     the following configuration directives, placed in a
     <code>.htaccess</code> file in the desired directory:</p>
 
-    <div class="example"><p><code>
-       Options +Includes<br />
-       AddType text/html shtml<br />
+    <pre class="prettyprint lang-config">
+       Options +Includes
+       AddType text/html shtml
        AddHandler server-parsed shtml
-    </code></p></div>
+    </pre>
+
 
     <p>Note that <code>AllowOverride Options</code> and <code>AllowOverride
     FileInfo</code> must both be in effect for these directives to have any
@@ -352,19 +351,21 @@ Options +IncludesNoExec -ExecCGI<br />
     the execution of CGI programs in a particular directory. This may be
     implemented with the following configuration:</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
        Options +ExecCGI<br />
        AddHandler cgi-script cgi pl
-    </code></p></div>
+    </pre>
+
 
     <p>Alternately, if you wish to have all files in the given directory be
     considered to be CGI programs, this may be done with the following
     configuration:</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
        Options +ExecCGI<br />
        SetHandler cgi-script
-    </code></p></div>
+    </pre>
+
 
     <p>Note that <code>AllowOverride Options</code> and <code>AllowOverride
     FileInfo</code> must both be in effect for these directives to have any
index a50a3b2c71922bee6bffcbd210c2e13caf8b8cca..debdc1d55c64e543f57f85e846e4a35707e76a1b 100644 (file)
@@ -299,19 +299,15 @@ changes on a per-directory basis.</p>
     prevent script execution while allowing anything else to be set in
     <code>.htaccess</code> you can use:</p>
 
-    <example>
-&lt;Directory /www/htdocs&gt;<br />
-<indent>
-Allowoverride All<br />
-</indent>
-&lt;/Directory&gt;<br />
-<br />
-&lt;Location /&gt;<br />
-<indent>
-Options +IncludesNoExec -ExecCGI<br />
-</indent>
+    <highlight language="config">
+&lt;Directory /www/htdocs&gt;
+    Allowoverride All
+&lt;/Directory&gt;
+
+&lt;Location /&gt;
+    Options +IncludesNoExec -ExecCGI<br />
 &lt;/Location&gt;
-    </example>
+    </highlight>
 
     <note>This example assumes that your <directive
     module="core">DocumentRoot</directive> is <code>/www/htdocs</code>.</note>
@@ -339,13 +335,13 @@ Options +IncludesNoExec -ExecCGI<br />
 
     <p><code>.htaccess</code> file contents:</p>
 
-    <example>
-      AuthType Basic<br />
-      AuthName "Password Required"<br />
-      AuthUserFile /www/passwords/password.file<br />
-      AuthGroupFile /www/passwords/group.file<br />
+    <highlight language="config">
+      AuthType Basic
+      AuthName "Password Required"
+      AuthUserFile /www/passwords/password.file
+      AuthGroupFile /www/passwords/group.file
       Require Group admins
-    </example>
+    </highlight>
 
     <p>Note that <code>AllowOverride AuthConfig</code> must be in effect
     for these directives to have any effect.</p>
@@ -361,11 +357,11 @@ Options +IncludesNoExec -ExecCGI<br />
     the following configuration directives, placed in a
     <code>.htaccess</code> file in the desired directory:</p>
 
-    <example>
-       Options +Includes<br />
-       AddType text/html shtml<br />
+    <highlight language="config">
+       Options +Includes
+       AddType text/html shtml
        AddHandler server-parsed shtml
-    </example>
+    </highlight>
 
     <p>Note that <code>AllowOverride Options</code> and <code>AllowOverride
     FileInfo</code> must both be in effect for these directives to have any
@@ -381,19 +377,19 @@ Options +IncludesNoExec -ExecCGI<br />
     the execution of CGI programs in a particular directory. This may be
     implemented with the following configuration:</p>
 
-    <example>
+    <highlight language="config">
        Options +ExecCGI<br />
        AddHandler cgi-script cgi pl
-    </example>
+    </highlight>
 
     <p>Alternately, if you wish to have all files in the given directory be
     considered to be CGI programs, this may be done with the following
     configuration:</p>
 
-    <example>
+    <highlight language="config">
        Options +ExecCGI<br />
        SetHandler cgi-script
-    </example>
+    </highlight>
 
     <p>Note that <code>AllowOverride Options</code> and <code>AllowOverride
     FileInfo</code> must both be in effect for these directives to have any
index 7e8d16867805e6e26d437e9562e6237de5f4ab38..7b9c2b37427f1233ad2be6ab8eb5002336731f5e 100644 (file)
     constructed using that path, plus the username specified. Given this
     configuration:</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
       UserDir /var/html
-    </code></p></div>
+    </pre>
+
 
     <p>the URL <code>http://example.com/~rbowen/file.html</code> will be
     translated to the file path <code>/var/html/rbowen/file.html</code></p>
     in which the asterisk is replaced with the username. Given this
     configuration:</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
       UserDir /var/www/*/docs
-    </code></p></div>
+    </pre>
+
 
     <p>the URL <code>http://example.com/~rbowen/file.html</code> will be
     translated to the file path
     <p>The <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> directive can be
       used to redirect user directory requests to external URLs.</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
       UserDir http://example.org/users/*/
-    </code></p></div>
+    </pre>
+
 
     <p>The above example will redirect a request for
     <code>http://example.com/~bob/abc.html</code> to
     <p>Using the syntax shown in the UserDir documentation, you can restrict
     what users are permitted to use this functionality:</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
       UserDir disabled root jro fish
-    </code></p></div>
+    </pre>
+
 
     <p>The configuration above will enable the feature for all users
     except for those listed in the <code>disabled</code> statement.
     You can, likewise, disable the feature for all but a few users by
     using a configuration like the following:</p>
 
-    <div class="example"><p><code>
+    <pre class="prettyprint lang-config">
       UserDir disabled<br />
       UserDir enabled rbowen krietz
-    </code></p></div>
+    </pre>
+
 
     <p>See <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code>
     documentation for additional examples.</p>
     directive to make a particular subdirectory of a user's home directory
     cgi-enabled.</p>
 
-    <div class="example"><p><code>
-      &lt;Directory /home/*/public_html/cgi-bin/&gt;<br />
-       Options ExecCGI<br />
-       SetHandler cgi-script<br />
+    <pre class="prettyprint lang-config">
+      &lt;Directory /home/*/public_html/cgi-bin/&gt;
+       Options ExecCGI
+       SetHandler cgi-script
        &lt;/Directory&gt;
-    </code></p></div>
+    </pre>
+
 
     <p>Then, presuming that <code>UserDir</code> is set to
     <code>public_html</code>, a cgi program <code>example.cgi</code>
index d2da191548eb8852cb9d2d0e6177b3713248fac6..d72c19fc69510c6f56a1de64defe6d213c94368c 100644 (file)
@@ -84,9 +84,9 @@
     constructed using that path, plus the username specified. Given this
     configuration:</p>
 
-    <example>
+    <highlight language="config">
       UserDir /var/html
-    </example>
+    </highlight>
 
     <p>the URL <code>http://example.com/~rbowen/file.html</code> will be
     translated to the file path <code>/var/html/rbowen/file.html</code></p>
@@ -95,9 +95,9 @@
     in which the asterisk is replaced with the username. Given this
     configuration:</p>
 
-    <example>
+    <highlight language="config">
       UserDir /var/www/*/docs
-    </example>
+    </highlight>
 
     <p>the URL <code>http://example.com/~rbowen/file.html</code> will be
     translated to the file path
     <p>The <directive module="mod_userdir">UserDir</directive> directive can be
       used to redirect user directory requests to external URLs.</p>
 
-    <example>
+    <highlight language="config">
       UserDir http://example.org/users/*/
-    </example>
+    </highlight>
 
     <p>The above example will redirect a request for
     <code>http://example.com/~bob/abc.html</code> to
     <p>Using the syntax shown in the UserDir documentation, you can restrict
     what users are permitted to use this functionality:</p>
 
-    <example>
+    <highlight language="config">
       UserDir disabled root jro fish
-    </example>
+    </highlight>
 
     <p>The configuration above will enable the feature for all users
     except for those listed in the <code>disabled</code> statement.
     You can, likewise, disable the feature for all but a few users by
     using a configuration like the following:</p>
 
-    <example>
+    <highlight language="config">
       UserDir disabled<br />
       UserDir enabled rbowen krietz
-    </example>
+    </highlight>
 
     <p>See <directive module="mod_userdir">UserDir</directive>
     documentation for additional examples.</p>
     directive to make a particular subdirectory of a user's home directory
     cgi-enabled.</p>
 
-    <example>
-      &lt;Directory /home/*/public_html/cgi-bin/&gt;<br />
-       Options ExecCGI<br />
-       SetHandler cgi-script<br />
+    <highlight language="config">
+      &lt;Directory /home/*/public_html/cgi-bin/&gt;
+       Options ExecCGI
+       SetHandler cgi-script
        &lt;/Directory&gt;
-    </example>
+    </highlight>
 
     <p>Then, presuming that <code>UserDir</code> is set to
     <code>public_html</code>, a cgi program <code>example.cgi</code>
index 99e61ea7166139e0ef211a62e0c9383dd4638991..dac9c1ab013031385ed5300c6ed640ec0032affd 100644 (file)
@@ -96,10 +96,11 @@ existing HTML documents.</p>
     do this. You can tell Apache to parse any file with a
     particular file extension, such as <code>.shtml</code>, with
     the following directives:</p>
-<div class="example"><p><code>
+<pre class="prettyprint lang-config">
         AddType text/html .shtml<br />
         AddOutputFilter INCLUDES .shtml
-</code></p></div>
+</pre>
+
 
     <p>One disadvantage to this approach is that if you wanted to
     add SSI directives to an existing page, you would have to
@@ -108,9 +109,10 @@ existing HTML documents.</p>
     directives would be executed.</p>
 
     <p>The other method is to use the <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code> directive:</p>
-<div class="example"><p><code>
+<pre class="prettyprint lang-config">
         XBitHack on
-</code></p></div>
+</pre>
+
 
     <p><code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>
     tells Apache to parse files for SSI
@@ -431,10 +433,11 @@ modified?</a></h3>
 
     <p>In your configuration file, you could put the following
     line:</p>
-<div class="example"><p><code>
+<pre class="prettyprint lang-config">
         BrowserMatchNoCase macintosh Mac<br />
         BrowserMatchNoCase MSIE InternetExplorer
-</code></p></div>
+</pre>
+
 
     <p>This will set environment variables ``Mac'' and
     ``InternetExplorer'' to true, if the client is running Internet
index c9ef923462545f3db896b752c81c2cac1500f766..017b3a473fee6d20272df2c8d7dac9df717d3f84 100644 (file)
@@ -98,10 +98,10 @@ existing HTML documents.</p>
     do this. You can tell Apache to parse any file with a
     particular file extension, such as <code>.shtml</code>, with
     the following directives:</p>
-<example>
+<highlight language="config">
         AddType text/html .shtml<br />
         AddOutputFilter INCLUDES .shtml
-</example>
+</highlight>
 
     <p>One disadvantage to this approach is that if you wanted to
     add SSI directives to an existing page, you would have to
@@ -111,9 +111,9 @@ existing HTML documents.</p>
 
     <p>The other method is to use the <directive
     module="mod_include">XBitHack</directive> directive:</p>
-<example>
+<highlight language="config">
         XBitHack on
-</example>
+</highlight>
 
     <p><directive module="mod_include">XBitHack</directive>
     tells Apache to parse files for SSI
@@ -436,10 +436,10 @@ modified?</title>
 
     <p>In your configuration file, you could put the following
     line:</p>
-<example>
+<highlight language="config">
         BrowserMatchNoCase macintosh Mac<br />
         BrowserMatchNoCase MSIE InternetExplorer
-</example>
+</highlight>
 
     <p>This will set environment variables ``Mac'' and
     ``InternetExplorer'' to true, if the client is running Internet