开发者

Tomcat/Apache Redirect for different file extensions or web directories

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 serve开发者_JAVA技巧r 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜