<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1659902:1673932 (outdated) -->
+<!-- English Revision: 1673932 -->
<!-- French translation : Lucien GENTIS -->
<!-- Reviewed by : Vincent Deffontaines -->
<example><title>Mandataire inverse</title>
<highlight language="config">
-ProxyPass /foo http://foo.example.com/bar
-ProxyPassReverse /foo http://foo.example.com/bar
+ProxyPass "/foo" "http://foo.example.com/bar"
+ProxyPassReverse "/foo" "http://foo.example.com/bar"
</highlight>
</example>
<example><title>Scripts PHP et mandataire inverse</title>
<highlight language="config">
-<FilesMatch \.php$>
+<FilesMatch "\.php$">
SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/"
</FilesMatch>
</highlight>
<example>
<highlight language="config">
- ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30
+ ProxyPass "/example" "http://backend.example.com" connectiontimeout=5 timeout=30
</highlight>
</example>
original, y compris un éventuel chemin donné :</p>
<highlight language="config">
-ProxyPass /examples http://backend.example.com/examples
-ProxyPass /docs http://backend.example.com/docs
+ProxyPass "/examples" "http://backend.example.com/examples"
+ProxyPass "/docs" "http://backend.example.com/docs"
</highlight>
<p>Dans cet exemple, deux workers différents sont définis, chacun
dans le fichier de configuration. Dans l'exemple suivant,</p>
<highlight language="config">
-ProxyPass /apps http://backend.example.com/ timeout=60
-ProxyPass /examples http://backend.example.com/examples timeout=10
+ProxyPass "/apps" "http://backend.example.com/" timeout=60
+ProxyPass "/examples" "http://backend.example.com/examples" timeout=10
</highlight>
<p>le second worker n'est pas vraiment créé. C'est le premier
<code>proxy-nokeepalive</code>.</p>
<highlight language="config">
-<Location /buggyappserver/>
- ProxyPass http://buggyappserver:7001/foo/
+<Location "/buggyappserver/">
+ ProxyPass "http://buggyappserver:7001/foo/"
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>
<code>http://example.com/</code> ; alors la ligne</p>
<highlight language="config">
-<Location /mirror/foo/>
- ProxyPass http://backend.example.com/
+<Location "/mirror/foo/">
+ ProxyPass "http://backend.example.com/"
</Location>
</highlight>
href="mod_proxy_balancer.html#balancer_manager">Balancer Manager</a> :</p>
<highlight language="config">
- ProxyPass /miroir/foo/ http://backend.example.com/
+ ProxyPass "/miroir/foo/" "http://backend.example.com/"
</highlight>
<note type="warning">
du mandat inverse, comme dans l'exemple suivant :</p>
<highlight language="config">
-<Location /mirror/foo/>
- ProxyPass http://backend.example.com/
+<Location "/mirror/foo/">
+ ProxyPass "http://backend.example.com/"
</Location>
-<Location /mirror/foo/i>
- ProxyPass !
+<Location "/mirror/foo/i">
+ ProxyPass "!"
</Location>
</highlight>
<highlight language="config">
-ProxyPass /mirror/foo/i !
-ProxyPass /mirror/foo http://backend.example.com
+ProxyPass "/mirror/foo/i" "!"
+ProxyPass "/mirror/foo" "http://backend.example.com"
</highlight>
<p>va mandater toutes les requêtes pour <code>/miroir/foo</code>
<example><title>Exemple</title>
<highlight language="config">
- ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300
+ ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300
</highlight>
</example>
</table>
<p>Exemple de configuration d'un répartiteur de charge</p>
<highlight language="config">
-ProxyPass /special-area http://special.example.com smax=5 max=10
-ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
+ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
+ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
<Proxy balancer://mycluster>
BalancerMember ajp://1.2.3.4:8009
BalancerMember ajp://1.2.3.5:8009 loadfactor=20
<p>Configuration d'un serveur cible de réserve qui ne sera utilisé que si
aucun autre serveur cible n'est disponible</p>
<highlight language="config">
-ProxyPass / balancer://hotcluster/
+ProxyPass "/" "balancer://hotcluster/ "
<Proxy balancer://hotcluster>
BalancerMember ajp://1.2.3.4:8009 loadfactor=1
BalancerMember ajp://1.2.3.5:8009 loadfactor=2
RewriteRule . - [E=protocol:https]
RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P]
-ProxyPassReverse /mirror/foo/ http://backend.example.com/
-ProxyPassReverse /mirror/foo/ https://backend.example.com/
+ProxyPassReverse "/mirror/foo/" "http://backend.example.com/"
+ProxyPassReverse "/mirror/foo/" "https://backend.example.com/"
</highlight>
</usage>
<code>http://example.com/</code> ; alors</p>
<highlight language="config">
- ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com/$1
+ ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com/$1"
</highlight>
<p>va provoquer la conversion interne de la requête locale
doit aussi l'être après). Ceci limite les correspondances que vous
pouvez utiliser. Par exemple, si l'on avait utilisé</p>
<highlight language="config">
- ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1
+ ProxyPassMatch "^(/.*\.gif)$"
+ "http://backend.example.com:8000$1"
</highlight>
<p>dans l'exemple précédent, nous aurions provoqué une erreur de
syntaxe au démarrage du serveur. C'est une bogue (PR 46665 dans
ASF bugzilla), et il est possible de la contourner en reformulant
la correspondance :</p>
<highlight language="config">
- ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1
+ ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com:8000/$1"
</highlight>
</note>
<code>http://example.com/</code> ; alors</p>
<highlight language="config">
-ProxyPass /mirror/foo/ http://backend.example.com/
-ProxyPassReverse /mirror/foo/ http://backend.example.com/
+ProxyPass "/mirror/foo/" "http://backend.example.com/"
+ProxyPassReverse "/mirror/foo/" "http://backend.example.com/"
ProxyPassReverseCookieDomain backend.example.com public.example.com
-ProxyPassReverseCookiePath / /mirror/foo/
+ProxyPassReverseCookiePath "/" "/mirror/foo/"
</highlight>
<p>ne va pas seulement provoquer la conversion interne d'une requête
module="mod_proxy">ProxyPassReverse</directive>, la directive :
</p>
<highlight language="config">
- ProxyPassReverseCookiePath / /mirror/foo/
+ ProxyPassReverseCookiePath "/" "/mirror/foo/"
</highlight>
<p>
va réécrire un cookie possédant un chemin d'arrière-plan <code>/</code>