Friday, March 12, 2010

Configure Apache:virtual host, mod_proxy and mod_proxy_ajp

Monday, November 24, 2008, 3:00
This news item was posted in HowTo & Tutorial category and has 0 Comments so far.
Icon from Nuvola icon theme for KDE 3.x.

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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • Wists
  • LinkedIn
  • Slashdot
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • email
  • Twitter

Related posts:

  1. Complete Apache 2.2-AJP Load Balance via mod_proxy
  2. multiple tomcat instance – single setup
  3. tomcat port configuration
  4. URI Encoding for tomcat 5.5.X

You can leave a response, or trackback from your own site.

Leave a Reply