views:

51

answers:

1

Is there anyway possible to create a way for tomcat to render files out of one directory and apache to render files out of another?

I have a java based CMS (Liferay) running on my ubuntu server running with Tomcat 6 and Apache 2... but I also have several PHP applications that need to be ran as well... Is there anyway to run PHP files and my Java CMS on the same server?

A: 

Yes, this is a common setup. How you do this depends on how you set up Apache with Tomcat (there are several ways like mod_jk, mod_proxy), but the basic idea is that Apache Server sits in front of Tomcat and is configured to only forward to Tomcat requests that have a particular prefix in their URL.

For instance, Apache handles everything under http://example.com/ but forwards to Tomcat anything under http://example.com/javaapp/

More info to get started: http://wiki.apache.org/tomcat/FAQ/Connectors

ykaganovich