<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1659899:1673563 (outdated) -->
+<!-- English Revision: 1673563 -->
<!-- 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>
ProxyRequests On
ProxyVia On
-<Proxy *>
+<Proxy "*">
Require host internal.example.com
</Proxy>
</highlight>
<example><title>Scripts PHP et mandataire inverse</title>
<highlight language="config">
-<FilesMatch \.php$>
+<FilesMatch "\.php$">
# Les sockets Unix nécessitent une version 2.4.7 ou supérieure du
# serveur HTTP Apache
SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/"
<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>
<example>
<highlight language="config">
- ProxySet http://backend.example.com connectiontimeout=5 timeout=30
+ ProxySet "http://backend.example.com" connectiontimeout=5 timeout=30
</highlight>
</example>
module="mod_proxy">ProxySet</directive> :</p>
<highlight language="config">
-<Proxy http://backend.example.com>
+<Proxy "http://backend.example.com">
ProxySet connectiontimeout=5 timeout=30
</Proxy>
</highlight>
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
l'exemple suivant :</p>
<highlight language="config">
-<Proxy *>
+<Proxy "*">
Require ip 192.168.0
</Proxy>
</highlight>
<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>votre-reseau.example.com</code> :</p>
<highlight language="config">
-<Proxy *>
+<Proxy "*">
Require host votre-reseau.example.com
</Proxy>
</highlight>
l'intermédiaire du serveur mandataire :</p>
<highlight language="config">
-<Proxy http://example.com/foo/*>
+<Proxy "http://example.com/foo/*">
SetOutputFilter INCLUDES
</Proxy>
</highlight>
elle commence par la <var>url-avec-jokers</var>, même si le
dernier segment de chemin de la directive ne correspond qu'à un
préfixe de segment dee chemin de l'URL d'arrière-plan. Par exemple, <Proxy
- http://example.com/foo> correspondra entre autres aux URLs
+ "http://example.com/foo"> correspondra entre autres aux URLs
http://example.com/foo, http://example.com/foo/bar, et
http://example.com/foobar. La correspondance de l'URL finale
diffère du comportement de la section <directive type="section"
nommés.</p>
<highlight language="config">
-<ProxyMatch ^http://(?<sitename>[^/]+)>
+<ProxyMatch "^http://(?<sitename>[^/]+)">
Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
</ProxyMatch>
</highlight>
<example><title>Exemple</title>
<highlight language="config">
-ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000
-ProxyRemote * http://cleverproxy.localdomain
-ProxyRemote ftp http://ftpproxy.mydomain:8080
+ProxyRemote "http://goodguys.example.com/"
+"http://mirrorguys.example.com:8000"
+ProxyRemote "*" "http://cleverproxy.localdomain"
+ProxyRemote "ftp" "http://ftpproxy.mydomain:8080"
</highlight>
</example>
<example>
<highlight language="config">
-<Proxy balancer://hotcluster>
- BalancerMember http://www2.example.com:8080 loadfactor=1
- BalancerMember http://www3.example.com:8080 loadfactor=2
+<Proxy "balancer://hotcluster">
+ BalancerMember "http://www2.example.com:8080" loadfactor=1
+ BalancerMember "http://www3.example.com:8080" loadfactor=2
ProxySet lbmethod=bytraffic
</Proxy>
</highlight>
</example>
<highlight language="config">
-<Proxy http://backend>
+<Proxy "http://backend">
ProxySet keepalive=On
</Proxy>
</highlight>
<highlight language="config">
- ProxySet balancer://foo lbmethod=bytraffic timeout=15
+ ProxySet "balancer://foo" lbmethod=bytraffic timeout=15
</highlight>
<highlight language="config">
- ProxySet ajp://backend:7001 timeout=15
+ ProxySet "ajp://backend:7001" timeout=15
</highlight>
<note type="warning"><title>Avertissement</title>
<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
-<Proxy balancer://mycluster>
- BalancerMember ajp://1.2.3.4:8009
- BalancerMember ajp://1.2.3.5:8009 loadfactor=20
+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
# Less powerful server, don't send as many requests there,
- BalancerMember ajp://1.2.3.6:8009 loadfactor=5
+ BalancerMember "ajp://1.2.3.6:8009" loadfactor=5
</Proxy>
</highlight>
<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/
-<Proxy balancer://hotcluster>
- BalancerMember ajp://1.2.3.4:8009 loadfactor=1
- BalancerMember ajp://1.2.3.5:8009 loadfactor=2
+ProxyPass "/" "balancer://hotcluster/"
+<Proxy "balancer://hotcluster">
+ BalancerMember "ajp://1.2.3.4:8009" loadfactor=1
+ BalancerMember "ajp://1.2.3.5:8009" loadfactor=2
# The server below is on hot standby
- BalancerMember ajp://1.2.3.6:8009 status=+H
+ BalancerMember "ajp://1.2.3.6:8009" status=+H
ProxySet lbmethod=bytraffic
</Proxy>
</highlight>
<highlight language="config">
RewriteEngine On
-RewriteCond %{HTTPS} =off
-RewriteRule . - [E=protocol:http]
-RewriteCond %{HTTPS} =on
-RewriteRule . - [E=protocol:https]
+RewriteCond "%{HTTPS}" =off
+RewriteRule "". "-" [E=protocol:http]
+RewriteCond "%{HTTPS}" =on
+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/
+RewriteRule "^/mirror/foo/(.*)" "%{ENV:protocol}://backend.example.com/$1" [P]
+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/
-ProxyPassReverseCookieDomain backend.example.com public.example.com
-ProxyPassReverseCookiePath / /mirror/foo/
+ProxyPass "/mirror/foo/" "http://backend.example.com/"
+ProxyPassReverse "/mirror/foo/" "http://backend.example.com/"
+ProxyPassReverseCookieDomain "backend.example.com" "public.example.com"
+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>
<example><title>Exemple</title>
<highlight language="config">
- ProxyBlock news.example.com auctions.example.com friends.example.com
+ ProxyBlock "news.example.com" "auctions.example.com" "friends.example.com"
</highlight>
</example>
<p>Notez aussi que</p>
<highlight language="config">
- ProxyBlock *
+ ProxyBlock "*"
</highlight>
<p>bloque les connexions vers tous les sites.</p>
<example><title>Exemple</title>
<highlight language="config">
-ProxyRemote * http://firewall.example.com:81
-NoProxy .example.com 192.168.112.0/21
+ProxyRemote "*" "http://firewall.example.com:81"
+NoProxy ".example.com" "192.168.112.0/21"
</highlight>
</example>
<example><title>Exemple</title>
<highlight language="config">
- ProxyRemote * http://firewall.example.com:81<br />
- NoProxy .example.com 192.168.112.0/21<br />
- ProxyDomain .example.com
+ ProxyRemote "*" "http://firewall.example.com:81"<br />
+ NoProxy ".example.com" "192.168.112.0/21"<br />
+ ProxyDomain ".example.com"
</highlight>
</example>
</usage>