You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kiran Doshi <ki...@techie.com> on 2013/01/08 15:35:34 UTC
[users@httpd] rewriting url after routing
Hi,
I am not an Apache expert & this is my first question to the form. I hope I am clear, if not please let me know.
I have the following requirement :
I have Pentaho and JBoss servers which sit behind an Apache server. I use mod_jk in Apache which decides the load balancer based on the application context.
Request for pentaho come in the form
http://localhost/pentaho/ViewAction..........
On seeing /pentaho context it routes the request to the pentaho load balancer (configured in worker properties file)
We now have different types of reports being served by pentaho for which we are using a virtual sub-context to decide which pentaho load balancer should handle the request. The request received by Apache now is in the form
http://localhost/pentaho/ *qr*/ViewAction...........
http://localhost/pentaho/ *cr*/ViewAction...........
etc
So now we configure mod_jk as
/pentaho/ *qr* - pentaho_qr_load_balancer
/pentaho/ *cr * - pentaho_cr_load_balancer
/pentaho - pentaho_lb
After the request is sent to the correct pentaho load balancer, I need to strip off the sub-context (/cr, /qr...)
For this I tried using mod_rewrite.
However after mod_jk routing the mod_rewrite is unable to rewrite the url.
If I do a mod_rewrite first, then the request goes to the incorrect mapping i.e. /pentaho (pentaho_lb)
Is there anyway to rewrite the url after mod jk, or is there any other mechanism besides mod jk and mod rewrite to achieve my objective
Regards
Kiran
Re: [users@httpd] rewriting url after routing
Posted by Igor Cicimov <ic...@gmail.com>.
On 09/01/2013 1:36 AM, "Kiran Doshi" <ki...@techie.com> wrote:
>
> Hi,
>
> I am not an Apache expert & this is my first question to the form. I hope
I am clear, if not please let me know.
>
> I have the following requirement :
> I have Pentaho and JBoss servers which sit behind an Apache server. I use
mod_jk in Apache which decides the load balancer based on the application
context.
> Request for pentaho come in the form
> http://localhost/pentaho/ViewAction..........
> On seeing /pentaho context it routes the request to the pentaho load
balancer (configured in worker properties file)
> We now have different types of reports being served by pentaho for which
we are using a virtual sub-context to decide which pentaho load balancer
should handle the request. The request received by Apache now is in the form
> http://localhost/pentaho/qr/ViewAction...........
> http://localhost/pentaho/cr/ViewAction...........
> etc
> So now we configure mod_jk as
> /pentaho/qr - pentaho_qr_load_balancer
> /pentaho/cr - pentaho_cr_load_balancer
> /pentaho - pentaho_lb
> After the request is sent to the correct pentaho load balancer, I need to
strip off the sub-context (/cr, /qr...)
> For this I tried using mod_rewrite.
> However after mod_jk routing the mod_rewrite is unable to rewrite the url.
> If I do a mod_rewrite first, then the request goes to the incorrect
mapping i.e. /pentaho (pentaho_lb)
> Is there anyway to rewrite the url after mod jk, or is there any other
mechanism besides mod jk and mod rewrite to achieve my objective
I dont think so, after mod_jk it is all ajp protocol and is out of apache
control. Look for some rewrite filter in jboss i know tomcat has one.
>
> Regards
> Kiran