diff options
-rw-r--r-- | docs/manual/howto/access.html.en | 38 | ||||
-rw-r--r-- | docs/manual/howto/access.xml | 34 | ||||
-rw-r--r-- | docs/manual/howto/auth.html.en | 155 | ||||
-rw-r--r-- | docs/manual/howto/auth.xml | 144 | ||||
-rw-r--r-- | docs/manual/howto/cgi.html.fr | 2 | ||||
-rw-r--r-- | docs/manual/howto/htaccess.html.en | 53 | ||||
-rw-r--r-- | docs/manual/howto/htaccess.xml | 48 | ||||
-rw-r--r-- | docs/manual/howto/public_html.html.en | 36 | ||||
-rw-r--r-- | docs/manual/howto/public_html.xml | 30 | ||||
-rw-r--r-- | docs/manual/howto/ssi.html.en | 15 | ||||
-rw-r--r-- | docs/manual/howto/ssi.xml | 12 |
11 files changed, 279 insertions, 288 deletions
diff --git a/docs/manual/howto/access.html.en b/docs/manual/howto/access.html.en index 24c14ff7fa..154821d0d2 100644 --- a/docs/manual/howto/access.html.en +++ b/docs/manual/howto/access.html.en @@ -68,10 +68,11 @@ <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 @@ -105,11 +106,12 @@ <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> @@ -124,13 +126,12 @@ based on user-agent (the browser type) you might do the following:</p> - <div class="example"><p><code> - <If "%{HTTP_USER_AGENT} = 'BadBot'"><br /> - <span class="indent"> - Require All Denied<br /> - </span> + <pre class="prettyprint lang-config"> + <If "%{HTTP_USER_AGENT} = 'BadBot'"> + Require All Denied </If> - </code></p></div> + </pre> + <div class="note"><h3>Warning:</h3> <p>Access control by <code>User-Agent</code> is an unreliable technique, @@ -153,12 +154,13 @@ <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} >20 [OR]<br /> - RewriteCond %{TIME_HOUR} <07<br /> + <pre class="prettyprint lang-config"> + RewriteEngine On + RewriteCond %{TIME_HOUR} >20 [OR] + RewriteCond %{TIME_HOUR} <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 diff --git a/docs/manual/howto/access.xml b/docs/manual/howto/access.xml index fe386be2aa..62ffd60075 100644 --- a/docs/manual/howto/access.xml +++ b/docs/manual/howto/access.xml @@ -67,10 +67,10 @@ <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 @@ -104,11 +104,11 @@ <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 @@ -126,13 +126,11 @@ based on user-agent (the browser type) you might do the following:</p> - <example> - <If "%{HTTP_USER_AGENT} = 'BadBot'"><br /> - <indent> - Require All Denied<br /> - </indent> + <highlight language="config"> + <If "%{HTTP_USER_AGENT} = 'BadBot'"> + Require All Denied </If> - </example> + </highlight> <note><title>Warning:</title> <p>Access control by <code>User-Agent</code> is an unreliable technique, @@ -156,12 +154,12 @@ <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} >20 [OR]<br /> - RewriteCond %{TIME_HOUR} <07<br /> + <highlight language="config"> + RewriteEngine On + RewriteCond %{TIME_HOUR} >20 [OR] + RewriteCond %{TIME_HOUR} <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 diff --git a/docs/manual/howto/auth.html.en b/docs/manual/howto/auth.html.en index c069f5c898..21aa5daea4 100644 --- a/docs/manual/howto/auth.html.en +++ b/docs/manual/howto/auth.html.en @@ -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 <Directory /usr/local/apache/htdocs/secret> 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> - <Directory /www/docs/private><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"> + <Directory /www/docs/private> + AuthName "Private" + AuthType Basic + AuthBasicProvider dbm + AuthDBMUserFile /www/passwords/passwd.dbm + Require valid-user </Directory> - </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> - <Directory /www/docs/private><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"> + <Directory /www/docs/private> + AuthName "Private" + AuthType Basic + AuthBasicProvider file ldap + AuthUserFile /usr/local/apache/passwd/passwords + AuthLDAPURL ldap://ldaphost/o=yourorg + Require valid-user </Directory> - </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> - <Directory /www/docs/private><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"> + <Directory /www/docs/private> + 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 </Directory> - </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"> <RequireAll> - <span class="indent"> - Require all granted<br /> + Require all granted Require not ip 10.252.46.165 - </span> </RequireAll> - </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"> <RequireAll> - <span class="indent"> - Require all granted<br /> + Require all granted Require not host <var>host.example.com</var> - </span> </RequireAll> - </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> - <RequireAll> - <span class="indent"> - Require all granted<br /> - <RequireNone> - <span class="indent"> - Require ip 192.168.205<br /> - Require host phishers.example.com moreidiots.example<br /> - Require host ke - </span> - </RequireNone> - </span> - </RequireAll> - </code></p></div> + <pre class="prettyprint lang-config"> + <RequireAll> + Require all granted + <RequireNone> + Require ip 192.168.205 + Require host phishers.example.com moreidiots.example + Require host ke + </RequireNone> + </RequireAll> + </pre> + <p>The above example uses the <code class="directive"><a href="../mod/mod_authz_core.html#requirenone"><RequireNone></a></code> directive to make sure that none of the diff --git a/docs/manual/howto/auth.xml b/docs/manual/howto/auth.xml index 1c8c019e53..01e139818c 100644 --- a/docs/manual/howto/auth.xml +++ b/docs/manual/howto/auth.xml @@ -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 <Directory /usr/local/apache/htdocs/secret> 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> - <Directory /www/docs/private><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"> + <Directory /www/docs/private> + AuthName "Private" + AuthType Basic + AuthBasicProvider dbm + AuthDBMUserFile /www/passwords/passwd.dbm + Require valid-user </Directory> - </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> - <Directory /www/docs/private><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"> + <Directory /www/docs/private> + AuthName "Private" + AuthType Basic + AuthBasicProvider file ldap + AuthUserFile /usr/local/apache/passwd/passwords + AuthLDAPURL ldap://ldaphost/o=yourorg + Require valid-user </Directory> - </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> - <Directory /www/docs/private><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"> + <Directory /www/docs/private> + 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 </Directory> - </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"> <RequireAll> - <indent> - Require all granted<br/> + Require all granted Require not ip 10.252.46.165 - </indent> </RequireAll> - </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"> <RequireAll> - <indent> - Require all granted<br/> + Require all granted Require not host <var>host.example.com</var> - </indent> </RequireAll> - </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> - <RequireAll> - <indent> - Require all granted<br/> - <RequireNone> - <indent> - Require ip 192.168.205<br /> - Require host phishers.example.com moreidiots.example<br /> - Require host ke - </indent> - </RequireNone> - </indent> - </RequireAll> - </example> + <highlight language="config"> + <RequireAll> + Require all granted + <RequireNone> + Require ip 192.168.205 + Require host phishers.example.com moreidiots.example + Require host ke + </RequireNone> + </RequireAll> + </highlight> <p>The above example uses the <directive module="mod_authz_core" type="section">RequireNone</directive> directive diff --git a/docs/manual/howto/cgi.html.fr b/docs/manual/howto/cgi.html.fr index ca77ea36e0..161c523740 100644 --- a/docs/manual/howto/cgi.html.fr +++ b/docs/manual/howto/cgi.html.fr @@ -26,6 +26,8 @@ <a href="../ja/howto/cgi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | <a href="../ko/howto/cgi.html" hreflang="ko" rel="alternate" title="Korean"> ko </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> diff --git a/docs/manual/howto/htaccess.html.en b/docs/manual/howto/htaccess.html.en index 9c86153189..5f1c171931 100644 --- a/docs/manual/howto/htaccess.html.en +++ b/docs/manual/howto/htaccess.html.en @@ -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> -<Directory /www/htdocs><br /> -<span class="indent"> -Allowoverride All<br /> -</span> -</Directory><br /> -<br /> -<Location /><br /> -<span class="indent"> -Options +IncludesNoExec -ExecCGI<br /> -</span> + <pre class="prettyprint lang-config"> +<Directory /www/htdocs> + Allowoverride All +</Directory> + +<Location /> + Options +IncludesNoExec -ExecCGI<br /> </Location> - </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 diff --git a/docs/manual/howto/htaccess.xml b/docs/manual/howto/htaccess.xml index a50a3b2c71..debdc1d55c 100644 --- a/docs/manual/howto/htaccess.xml +++ b/docs/manual/howto/htaccess.xml @@ -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> -<Directory /www/htdocs><br /> -<indent> -Allowoverride All<br /> -</indent> -</Directory><br /> -<br /> -<Location /><br /> -<indent> -Options +IncludesNoExec -ExecCGI<br /> -</indent> + <highlight language="config"> +<Directory /www/htdocs> + Allowoverride All +</Directory> + +<Location /> + Options +IncludesNoExec -ExecCGI<br /> </Location> - </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 diff --git a/docs/manual/howto/public_html.html.en b/docs/manual/howto/public_html.html.en index 7e8d168678..7b9c2b3742 100644 --- a/docs/manual/howto/public_html.html.en +++ b/docs/manual/howto/public_html.html.en @@ -80,9 +80,10 @@ 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> @@ -91,9 +92,10 @@ 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 @@ -118,9 +120,10 @@ <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 @@ -134,19 +137,21 @@ <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> @@ -161,12 +166,13 @@ directive to make a particular subdirectory of a user's home directory cgi-enabled.</p> - <div class="example"><p><code> - <Directory /home/*/public_html/cgi-bin/><br /> - Options ExecCGI<br /> - SetHandler cgi-script<br /> + <pre class="prettyprint lang-config"> + <Directory /home/*/public_html/cgi-bin/> + Options ExecCGI + SetHandler cgi-script </Directory> - </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> diff --git a/docs/manual/howto/public_html.xml b/docs/manual/howto/public_html.xml index d2da191548..d72c19fc69 100644 --- a/docs/manual/howto/public_html.xml +++ b/docs/manual/howto/public_html.xml @@ -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 @@ -122,9 +122,9 @@ <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 @@ -138,19 +138,19 @@ <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> @@ -165,12 +165,12 @@ directive to make a particular subdirectory of a user's home directory cgi-enabled.</p> - <example> - <Directory /home/*/public_html/cgi-bin/><br /> - Options ExecCGI<br /> - SetHandler cgi-script<br /> + <highlight language="config"> + <Directory /home/*/public_html/cgi-bin/> + Options ExecCGI + SetHandler cgi-script </Directory> - </example> + </highlight> <p>Then, presuming that <code>UserDir</code> is set to <code>public_html</code>, a cgi program <code>example.cgi</code> diff --git a/docs/manual/howto/ssi.html.en b/docs/manual/howto/ssi.html.en index 99e61ea716..dac9c1ab01 100644 --- a/docs/manual/howto/ssi.html.en +++ b/docs/manual/howto/ssi.html.en @@ -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 diff --git a/docs/manual/howto/ssi.xml b/docs/manual/howto/ssi.xml index c9ef923462..017b3a473f 100644 --- a/docs/manual/howto/ssi.xml +++ b/docs/manual/howto/ssi.xml @@ -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 |