On 12/15/2010 9:20 PM, Shawn Heisey wrote:
On 12/15/2010 7:50 PM, Cyril Bonté wrote:

This configuration
should work (fixed the acl and merged all the reqirep in the
frontend) :



The things that match /foo* can't use the tomcat backend, they have to use the apache backend. Everything that doesn't match an ACL uses the tomcat backend, which is not really tomcat, it's still apache - but apache sends it through to tomcat, thus the name. The /foo* paths are sent to the CGI, hosted by apache. If we can make it work, I do plan eventually to put the actual tomcat server ports in the tomcat backend.

Apologies for presenting a moving configuration target. It has now moved into production and the config is different in minor ways. It now has two servers, not just one.

I've put the sanitized config up on a webserver so you can see it without your email client making changes to it.

http://www.elyograg.org/haproxycfg.txt


Perhaps what doesn't work in my first attempt is having more than one thing happen if an ACL matches. To put everything into the frontend, I need to use a config like this, to have it both rewrite the request and send it to a nondefault backend:

reqirep ^([^\ ]*)\ /fooc/(.*) \1\ /cgi-bin/cgi-gw.exe?action=capt&fooid=\2 if fooc
    use_backend apache    if fooc

I'm guessing that it works like a Cisco access-list - the first entry that matches determines the outcome, the rest of the entries are ignored. If I'm right, then it would probably work if I put all the reqirep statements in the backend, where they wouldn't need acl conditions.

Thanks,
Shawn

Reply via email to