Can a single Apache server handle both Tomcat and PHP?

后端 未结 4 798
滥情空心
滥情空心 2021-02-04 15:26

I have a requirement as to have a single server with both a Java application and a PHP application, running on the same Apache. Is this possible?

This question may be ve

4条回答
  •  无人共我
    2021-02-04 16:07

    Yes.

    Apache HTTPd can delegate to Apache Tomcat using ModProxy or ModAJP, and can be configured to do so based on the domain, path or file extension requested. Your Apache HTTPd configuration of PHP would remain the same.

    You would need to configure Apache Tomcat to not listen on port 80, and then configure the Apache HTTPd proxying solution of your choice to talk to Tomcat on a different port.

    Here's a starting point for more information: Apache + Tomcat: Using mod_proxy instead of AJP

提交回复
热议问题