I get the feeling that I am talking to myself, but that's OK.

This is finally working, but I'm not happy with the way the config turned out. Last night, I commented out all but one of the reqirep statements. That one statement by itself was working. That gave me an idea, and so I created a separate backend for each ACL, and put one reqirep in each one.

This makes it look like I can't have more than one reqirep in the frontend. Can I put them all in a single backend? I don't like all the duplication my current config has. Here is the config, with the critical identifier changed to "foo" throughout:

frontend foo *:80
acl bot hdr(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

    use_backend apache_fooh     if bot fooh
    use_backend apache_foo      if foo
    use_backend apache_fooc     if fooc
    use_backend apache_foothumb if foothumb
    use_backend apache_featured 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

backend apache_foo
reqirep ^([^\ ]*)\ /foo/(.*) \1\ /cgi-bin/cgi-gw.exe?action=webres&fooid=\2
    balance     leastconn
    server      server8080 10.10.14.127:8080 check
    server      server8081 10.10.14.127:8081 check

backend apache_fooh
reqirep ^([^\ ]*)\ /fooh/(.*) \1\ /cgi-bin/cgi-gw.exe?action=autodetails&fooid=\2
    balance     leastconn
    server      server8080 10.10.14.127:8080 check
    server      server8081 10.10.14.127:8081 check

backend apache_fooc
reqirep ^([^\ ]*)\ /fooc/(.*) \1\ /cgi-bin/cgi-gw.exe?action=capt&fooid=\2
    balance     leastconn
    server      server8080 10.10.14.127:8080 check
    server      server8081 10.10.14.127:8081 check

backend apache_foothumb
reqirep ^([^\ ]*)\ /foothumb/(.*) \1\ /cgi-bin/cgi-gw.exe?action=thumbres&fooid=\2
    balance     leastconn
    server      server8080 10.10.14.127:8080 check
    server      server8081 10.10.14.127:8081 check

backend apache_featured
reqirep ^([^\ ]*)\ /featured/foothumbnew/(.*) \1\ /cgi-bin/cgi-gw.exe?action=thumbreshigh&fooid=\2
    balance     leastconn
    server      server8080 10.10.14.127:8080 check
    server      server8081 10.10.14.127:8081 check



On 12/14/2010 12:34 PM, Shawn Heisey wrote:
I spoke too soon. This just made it pass through unchanged, and the URL rewriting on the backend took care of it.

It seems that this config line:

reqirep ^([^\ ]*)\ /string1/(.*) \1\ /cgi-bin/cgi-gw.exe?action=webres&id=\2

Does not match this request:

GET /string1/20101117/CL03874 HTTP/1.1


Reply via email to