Le mercredi 15 décembre 2010 23:32:23, Shawn Heisey a écrit : > I buried this email deep in another thread, bringing it back to the top > with a new message. > > I have a bunch of rewrites that I need to do to incoming requests. I > tried initially putting them all in the frontend, but that didn't work.
That should. > What finally worked was creating multiple backends, each with one > reqirep in it and the same pair of server entries in all of them. Is it > a known limitation that only one reqrep/reqirep statement is allowed? This is probably due to a non trivial misconfiguration. > Is there a way to streamline my configuration so that I only have to > define the server list once? Can you put multiple reqirep statements in > the backend? I haven't tried this yet because they won't let me risk > breaking it for a day or two. You mean one server list for several backends ? Currently, no. This configuration should work (fixed the acl and merged all the reqirep in the frontend) : frontend foo :80 acl bot hdr_sub(User-Agent) -i ia_archiver jeeves googlebot mediapartners-google msnbot slurp zyborg acl foo path_beg -i /foo acl fooc path_beg -i /fooc acl fooh path_beg -i /fooh acl foothumb path_beg -i /foothumb acl featured path_beg -i /featured/foothumbnew/ acl cgi path_beg -i /cgi-bin/cgi-gw.exe reqirep ^([^\ ]*)\ /fooh/(.*) \1\ /cgi-bin/cgi- gw.exe?action=autodetails&fooid=\2 if bot fooh reqirep ^([^\ ]*)\ /foo/(.*) \1\ /cgi-bin/cgi- gw.exe?action=webres&fooid=\2 if foo reqirep ^([^\ ]*)\ /fooc/(.*) \1\ /cgi-bin/cgi- gw.exe?action=capt&fooid=\2 if fooc reqirep ^([^\ ]*)\ /foothumb/(.*) \1\ /cgi-bin/cgi- gw.exe?action=thumbres&fooid=\2 if foothumb reqirep ^([^\ ]*)\ /featured/foothumbnew/(.*) \1\ /cgi-bin/cgi- gw.exe?action=thumbreshigh&fooid=\2 if featured use_backend apache if cgi default_backend tomcat backend tomcat balance leastconn server server8080 10.10.14.127:8080 check server server8081 10.10.14.127:8081 backup check backend apache balance leastconn server server8080 10.10.14.127:8080 check server server8081 10.10.14.127:8081 check -- Cyril Bonté