<p>The most essential part of any request is the <em>request record
</em>. In a call to a handler function, this is represented by the <code>
request_rec* </code> structure passed along with every call that is made.
-This struct, typically just refered to as <code>r</code> in modules,
+This struct, typically just referred to as <code>r</code> in modules,
contains all the information you need for your module to fully process any
HTTP request and respond accordingly.</p> <p>Some key elements of the <code>
request_rec </code> structure are:
<p>
-This version in its entirity can be found here:
+This version in its entirety can be found here:
<a href="http://people.apache.org/~humbedooh/mods/examples/mod_example_2.c">mod_example_2.c</a>.
</p>
<h3><a name="directive_handler" id="directive_handler">The directive handler function</a></h3>
<p>
-Now that we've told the server to expect some directives for our module, it's
+Now that we have told the server to expect some directives for our module, it's
time to make a few functions for handling these. What the server reads in the
configuration file(s) is text, and so naturally, what it passes along to
our directive handler is one or more strings, that we ourselves need to
this directive in a global server context, but since we are now trying out
a context aware version of our module, we should set this to something
more lenient, namely the value <code>ACCESS_CONF</code>, which lets us use
-the directive inside <Directory> and <Location> blocks.
+the directive inside <Directory> and <Location> blocks. For more
+control over the placement of your directives, you can combine the following
+restrictions together to form a specific rule:
</p>
+<ul>
+<li><code>RSRC_CONF</code>: Allow in .conf files (not .htaccess) outside <Directory> or <Location></li>
+<li><code>ACCESS_CONF</code>: Allow in .conf files (not .htaccess) inside <Directory> or <Location></li>
+<li><code>OR_OPTIONS</code>: Allow in .conf files and .htaccess when <code>AllowOverride Options</code> is set</li>
+<li><code>OR_FILEINFO</code>: Allow in .conf files and .htaccess when <code>AllowOverride FileInfo</code> is set</li>
+<li><code>OR_AUTHCFG</code>: Allow in .conf files and .htaccess when <code>AllowOverride AuthConfig</code> is set</li>
+<li><code>OR_INDEXES</code>: Allow in .conf files and .htaccess when <code>AllowOverride Indexes</code> is set</li>
+<li><code>OR_ALL</code>: Allow anywhere in .conf files and .htaccess</li>
+</ul>
<h3><a name="context_pool" id="context_pool">Using the server to allocate configuration slots</a></h3>
keyValuePair* formData;
/*~~~~~~~~~~~~~~~~~~~~~~*/
- formData = readPost();
+ formData = readPost(r);
if (formData) {
int i;
for (i = 0; formData[i]; i++) {
properly protected. You should only use the <code class="directive"><a href="#authldapbinddn">AuthLDAPBindDN</a></code> and <code class="directive"><a href="#authldapbindpassword">AuthLDAPBindPassword</a></code> if you
absolutely need them to search the directory.</p>
+ <p>If the value begins with exec: the resulting command will be
+ executed and the first line returned to standard output by the
+ program will be used as the password.</p>
+<div class="example"><pre>
+#Password used as-is
+AuthLDAPBindPassword secret
+
+#Run /path/to/program to get my password
+AuthLDAPBindPassword exec:/path/to/program
+
+#Run /path/to/otherProgram and provide arguments
+AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
+</pre></div>
+
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AuthLDAPCharsetConfig" id="AuthLDAPCharsetConfig">AuthLDAPCharsetConfig</a> <a name="authldapcharsetconfig" id="authldapcharsetconfig">Directive</a></h2>
vous en avez vraiment besoin pour effectuer une recherche dans
l'annuaire.</p>
+ <p>Si la valeur spécifiée débute par "exec:", la commande qui suit sera
+ exécutée, et la première ligne renvoyée par la commande sur la
+ sortie standard sera utilisée comme mot de passe.</p>
+<div class="example"><pre>
+# Mot de passe spécifié directement
+AuthLDAPBindPassword secret
+
+# Exécution de /path/to/program pour obtenir le mot de passe
+AuthLDAPBindPassword exec:/path/to/program
+
+# Exécution de /path/to/otherProgram avec un argument pour obtenir le mot de passe
+AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
+</pre></div>
+
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AuthLDAPCharsetConfig" id="AuthLDAPCharsetConfig">AuthLDAPCharsetConfig</a> <a name="authldapcharsetconfig" id="authldapcharsetconfig">Directive</a></h2>
input and output. The size must be at least <code>512</code>.</p>
<p>In almost every case there's no reason to change that value.</p>
+
<p>If used with AJP this directive sets the maximum AJP packet size in
- bytes. If you change it from the default, you must also change the
- <code>packetSize</code> attribute of your AJP connector on the
- Tomcat side! The attribute <code>packetSize</code> is only available
- in Tomcat <code>5.5.20+</code> and <code>6.0.2+</code></p>
+ bytes. Values larger than 65536 are set to 65536. If you change it from
+ the default, you must also change the <code>packetSize</code> attribute of
+ your AJP connector on the Tomcat side! The attribute
+ <code>packetSize</code> is only available in Tomcat <code>5.5.20+</code>
+ and <code>6.0.2+</code></p>
+
<p>Normally it is not necessary to change the maximum packet size.
Problems with the default value have been reported when sending
certificates or certificate chains.</p>
force the worker into error state when the backend returns any status code
in the list. Worker recovery behaves the same as other worker errors.
</td></tr>
+ <tr><td>failontimeout</td>
+ <td>Off</td>
+ <td>If set, an IO read timeout after a request is sent to the backend will
+ force the worker into error state. Worker recovery behaves the same as other
+ worker errors.
+ Available in Apache HTTP Server 2.4.5 and later.
+ </td></tr>
<tr><td>nonce</td>
<td><auto></td>
<td>The protective nonce used in the <code>balancer-manager</code> application page.
<p>Dans la plupart des cas, il n'y a aucune raison de modifier cette
valeur.</p>
+
<p>Si elle est utilisée avec AJP, cette directive permet de définir
- la taille maximale du paquet AJP en octets. Si vous ne conservez pas
+ la taille maximale du paquet AJP en octets. Si la valeur spécifiée
+ est supérieure à 65536, elle est corrigée et prend la valeur 65536.
+ Si vous ne conservez pas
la valeur par défaut, vous devez aussi modifier l'attribut
<code>packetSize</code> de votre connecteur AJP du côté de Tomcat !
L'attribut <code>packetSize</code> n'est disponible que dans Tomcat
dans la liste. La récupération du worker s'effectue comme dans
le cas des autres erreurs de worker.
</td></tr>
-
+ <tr><td>failontimeout</td>
+ <td>Off</td>
+ <td>Si ce paramètre est défini à "On", un délai d'attente
+ dépassé en entrée/sortie après envoi d'une requête au serveur
+ d'arrière-plan va mettre le processus en état d'erreur. La
+ sortie de cet état d'erreur se passe de la même façon que pour
+ les autres erreurs.
+ Disponible à partir de la version 2.4.5 du serveur HTTP Apache.
+ </td></tr>
<tr><td>nonce</td>
<td><auto></td>
<td>Le nombre à usage unique de protection utilisé dans la page
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 344971:1475706 (outdated) -->
+<!-- English Revision: 344971:1476689 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
<a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
<a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
</div>
-<div class="outofdate">Cette traduction peut être périmée. Vérifiez la version
- anglaise pour les changements récents.</div>
<p>Ce document explique comment le serveur HTTP Apache utilise l'URL contenue dans une
requête pour déterminer le noeud du système de fichier à partir duquel le
<div class="section">
<h2><a name="related" id="related">Modules et directives concernés</a></h2>
-<table class="related"><tr><th>Modules Apparentés</th><th>Directives Apparentées</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
+<table class="related"><tr><th>Modules Apparentés</th><th>Directives Apparentées</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/core.html#directoryindex">DirectoryIndex</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="documentroot" id="documentroot">Racine des documents (DocumentRoot)</a></h2>
<code>http://www.example.com/fish/guppies.html</code> retournera le
fichier <code>/var/www/html/fish/guppies.html</code> au client.</p>
+ <p>Si la requête concerne un répertoire (autrement dit un chemin se
+ terminant par un slash <code>/</code>), le nom du fichier qui sera
+ recherché et servi depuis ce répertoire est défini via la directive
+ <code class="directive"><a href="./mod/core.html#directoryindex">DirectoryIndex</a></code>. Par exemple,
+ supposons que <code>DocumentRoot</code> ait été définie comme
+ précédemment, et que vous ayez défini <code>DirectoryIndex</code>
+ comme suit :</p>
+
+ <div class="example"><p><code>DirectoryIndex index.html index.php</code></p></div>
+
+ <p>Si httpd reçoit alors une requête pour
+ <code>http://www.example.com/fish/</code>, il tentera de servir le
+ fichier <code>/var/www/html/fish/index.html</code>. Si ce fichier
+ n'existe pas, il tentera de servir le fichier
+ <code>/var/www/html/fish/index.php</code>.</p>
+
+ <p>Si aucun de ces fichiers existe, httpd tentera de générer et
+ d'afficher un index du répertoire, à condition que
+ <code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code> ait été chargé et configuré pour le
+ permettre.</p>
+
<p>httpd supporte aussi les <a href="vhosts/">Hôtes virtuels</a>,
ce qui lui permet de traiter des requêtes pour plusieurs hôtes.
Dans ce cas, un <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>
<variants>
<variant>en</variant>
- <variant outdated="yes">fr</variant>
+ <variant>fr</variant>
<variant outdated="yes">ja</variant>
<variant outdated="yes">ko</variant>
<variant outdated="yes">tr</variant>