gpt4 book ai didi

java - 在同一台服务器上运行 php 和 java

转载 作者:行者123 更新时间:2023-12-02 08:14:48 25 4
gpt4 key购买 nike

我有使用 java 编写的 Web 服务,它与 Android 应用程序交互,现在我们需要使用 php 框架工作 codeigniter 实现前端 Web 门户。我们有通用数据库 mysql 5.1,它与 Web 服务和 Web 门户交互,是否可以在已经运行 tomcat6 servlet 容器但没有 apache Web 服务器的服务器中配置 LAMP 堆栈。我如何进一步处理,当我搜索相同的问题时,我发现一个叫做 php javabridge 的东西是我必须使用的?让我更准确地说,我已经运行了 ec2 ubuntu 实例,域停放在 godaddy 中,我已经使用我的 ec2 实例的 IP 配置了 A 记录,因此当请求传入时,它将被定向到应用程序正在 tomcat6/webapps/ROOT 中运行,但现在我需要将其重定向到 php 应用程序,我该怎么做,并且来自 android 的请求应该定向到基于 java 的 Web 服务,我该如何管理?

请大家帮忙

最佳答案

您可以代理从 Apache 到 tomcat 服务器的请求...有两个虚拟主机,一个用于 tomcat,另一个用于 php ...全部由 apache 协调。

http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

It is recommended that you also read the Workers HowTo document to learn how to setup the working entities between your web server and Tomcat Engines. For more detailed configuration information consult the Reference Guide for workers.properties, uriworkermap and Apache.

关于java - 在同一台服务器上运行 php 和 java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6660732/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com