Image via Wikipedia
Once you configured your java application server and apache everything is fine until you want to host your another domain at the same server.
I assume that you have configured your apache server: Complete Apache 2.2-AJP Load Balance via mod_proxy
If you have succeed this configuration, I hope so
add your virtual host configuration:
NameVirtualHost www.mystaticdomain.com:80
NameVirtualHost www.myjspdomain.com:80
and add new configuration command around previous ajp conf:
<VirtualHost www.myjspdomain.com:80>
ServerName www.myjspdomain.com<Location /balancer-manager>
SetHandler balancer-manager
</Location><Proxy balancer://ajpCluster>
BalancerMember ajp://localhost:8009 route=s1
BalancerMember ajp://localhost:9009 route=s2
BalancerMember ajp://localhost:7009 route=s3
</Proxy>
<Location /jspapp1>
ProxyPass balancer://ajpCluster/jspapp1 stickysession=JSESSIONID
</Location>
<Location /jspapp2>
ProxyPass balancer://ajpCluster/jspapp2 stickysession=JSESSIONID</Location>
</VirtualHost>
and you have ajp proxy cluster and virtual host configuration for apache 2.2 at the same time.
Related posts: