httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Shevett <>
Subject [users@httpd] Httpd vhosts and ProxyPass/ProxyPassReverse and AJP - am I on crack?
Date Mon, 26 Nov 2012 19:37:03 GMT
I'm beginning to wonder if what I'm trying to do Just Doesn't Make 
Sense.  After banging my head on this for 2 weeks, I'm asking the hive 
mind for help.

I have an Apache Tomcat-based application that runs on as the only app 
on a particular Tomcat server.  Each server services an individual 
client.  When I have a new client, I spin a new server (this is actually 
in EC2, so this is very easy to do).

The tomcat application runs on the 'middle tier', and is fronted by an 
Apache HTTP server that has a single exposed IP, and proxies connections 
back to the appserver.

So far so good.

The problem is I want to have subdirectories within the initial URL map 
to different back end servers.  IE: <-- goes to server 'app01' <-- goes to server 'app02'

And so on.  The problem is I can't figure out what magic incantations to 
put in httpd.conf to make this work. Note that I have working vhosts 
answering subdomain requests, and proxying back correctly - like this one:

<VirtualHost *:80>
         ProxyPreserveHost On
         ProxyPass / ajp://
         ProxyPassReverse / ajp://

But I'm trying to change this so goes somewhere 
different than

Here's what I have now, and it's not working correctly.

<VirtualHost *:80>

         ProxyRequests Off

         # Working, live production host:
         ProxyPass /a/ ajp://
         ProxyPassReverse /a/

         # app test host
         ProxyPass /c/ ajp://
         ProxyPassReverse /c/

The first Proxy configuration is working correctly.  Requests coming 
into /a/ go to the server on  No worries.  But hitting the 
second address will end me back up at /a/ - I'm guessing because there 
are essentially two ProxyPassReverse's for the same url (

Is this configuration even possible using ProxyPass and 
ProxyPassReverse?  Should I reconfigure this to use mod_rewrite and use 
[P] rules?  An initial stab at that failed, but if that's where I should 
go I'll use it.

Help please?

Dave Shevett

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message