Apache Geronimo > Discussion Forums  User List | Dev List | Wiki | Issue Tracker  

 « Return to Thread: configure 3 IP based apache vhosts to 1 geronimo host

configure 3 IP based apache vhosts to 1 geronimo host

by Bill Brown :: Rate this Message:

Reply to Author | View in Thread

Greetings geronimo users.  

I have a question for people regarding the configuration of geronimo 2.1.4 I'm trying to get working.

I have 3 apache IP based virtual hosts.  hosta, hostb, hostc

I have 1 backend geronimo instance with three apps: localhost/hostaApp, localhost/hostbApp, localhost/hostcApp

Im using mod_proxy ajp/load balancing to attempt connect the two together  
in each vhost configuration, I have the balancer setup and configured as so:

<VirtualHost 1.2.3.4:80>
        ServerName www.hosta.com
        ServerAlias hosta.com *.hosta.com

        <Proxy balancer://tomcat>
                BalancerMember ajp://localhost:8009 route=tomcat1
        </Proxy>

        ProxyPass / balancer://tomcat/hostaApp stickysession=JSESSIONID

        CustomLog /var/log/apache2/hosta.log combined
        LogLevel debug
</VirtualHost>

with this setup, I type in at the browser "http://www.hosta.com"  and what I get back is the url "http://www.hosta.com/hostaApp"

I want the proxy to work with out rewriting the url and adding the /hostaApp at the end.  

In the debug logs I see stuff like

[Fri Jun 12 10:34:31 2009] [debug] mod_proxy_balancer.c(536): proxy: BALANCER (balancer://
tomcat) worker (ajp://localhost:8009) rewritten to ajp://localhost:8009/hostahostaApp/
...
[Fri Jun 12 10:34:31 2009] [debug] proxy_util.c(1916): proxy: connecting ajp://localhost:8
009/hostahostaApp/ to localhost:8009
[Fri Jun 12 10:34:31 2009] [debug] proxy_util.c(2015): proxy: connected /hostahostaApp/ to localhost:8009
...

Does someone here know if a setup like this is possible.  Having 3 apache vhosts proxied to a single vhost geronimo backend serving a different app for the 3 vhosts?  

I have had this configuring working in the past by making 3 geronimo vhosts one for each app but I'm hoping to avoid the added geronimo configuration if possible.  

Maybe there is some changes I can make to the ajp connector?

Thanks for you help in looking at this.
Bill.

 « Return to Thread: configure 3 IP based apache vhosts to 1 geronimo host