"Pid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Christopher Schultz wrote: >> Bill, >> >> Thanks for the response. >> >>> I've seen some talk on [EMAIL PROTECTED] about implementing support for >>> regexps in mod_proxy, but I don't think anything has happened yet. >> >> It doesn't appear to be a question of regular expressions, since the >> <Location> element can use regular expressions. The problem is that, >> when those regular expressions are used, it clobbers the URL for >> proxying, and the proxy attempts to use the wrong source URL (or >> something). >> >>> What you want is something like: >>> RewriteRule /my/path/.*\.whatever\.else >>> ajp://localhost:8285/my/path/$1.whatever.else [P] >> >> For whatever reason, this does not work on its own. I figured that I >> could do something like this: >> >> RewriteRule /myApp/some/special.url \ >> ajp://localhost:8285/myApp/special.url [P] >> RewriteRule /myApp/(.*) \ >> ajp://localhost:8185/myApp/$1 [P] >> >> ...but that's not enough. You have to mix both RewriteRule /and/ > >> ProxyPass to achieve the desired result: >> >> RewriteRule /myApp/some/special.url \ >> ajp://localhost:8285/myApp/special.url [P] >> ProxyPass /myApp ajp://localhost:8185/myApp > > AFAIK you can only use the ProxyPass directive to set the additional > configuration parameters (lb type etc). > > I've used a single long none-existent URL to do that where needed, and > just used the ReWrite rule to parse the URLs. >
This is right, if you haven't configured the worker in a <Proxy balancer://mycluster> BalancerMember ajp://localhost:8285 </Proxy> Otherwise, yeah, just use a non-existent URL in the ProxyPass directive. You might also consider writing up a bug report for the Httpd BZ. > >> My best guess is that Apache requires the ProxyPass directive in there >> so that my virtual host gets configured to use mox_proxy /at all/. I'd >> imagine that I could have as many RewriteRules as I needed, as long as >> that one ProxyPass directive is in there. >> >> Perhaps someone with a better understanding can tell me what's really >> going on. >> >> For now, I'm happy since it appears to work exactly as desired. >> >> Thanks a lot for the help! >> >> -chris >> > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]