Tomcat VirtualHosts!
For CentOS:
yum install java
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps
/etc/init.d/tomcat6 start
After installing it, config file is /etc/tomcat6/server.xml
Enable an AJP connector
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" protocol="AJP/1.3" redirectPort="8443" uriencoding="UTF-8"/>
add a new host
Host name="hostname.com" appBase="/dir/root/">
<Alias>www.hostname.com</Alias>
<Context path="" reloadable="true" docBase="/dir/root/" debug="1"/>
and enable logging
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="/path/to/log/" suffix=".txt"
pattern="common"/>
</Host>
Now interface it with Apache.