douhua9726 2011-02-25 02:58
浏览 58
已采纳

适用于GWT,PHP和SSL的最佳单一服务器解决方案

So right now I'm rocking Apache 2.2, which I've had running for a couple years (only for local purposes). With Apache, I have PHP 5 installed. Recently I installed Tomcat 7 for Java Servlet support (GWT specifically). I also have Tomcat supports SSL (on a separate port which is annoying but manageable for now).

Here's my problem. GWT cannot use PHP pages and PHP cannot use SSL (unless I install that on Apache). What would be the best solution to get GWT, PHP, and SSL on single server or at least able to interact.

I was thinking maybe install PHP on Tomcat because it already has GWT and SSL ready but a quick Google search didn't show promise on this. Another option I've heard is that Apache can forward certain requests (such as Java Servlets) to Tomcat. I'm hoping someone has a quick answer to save me the headache of Googling.

Also, Apache is running on port XXX1, Tomcat XXX2, and Tomcat SSL XXX3. Is there a way to get these all on a single port? I'm guessing it'd have to be configured at the router/gateway and forwarded to each correct port?

  • 写回答

4条回答 默认 最新

  • doudong8713 2011-02-25 03:54
    关注

    Use Apache as a proxy for Tomcat, and have the SSL configured on Apache. You'll need to use mod_proxy for this. A sample configuration would look like this:

    ProxyPass /tomcat/ http://127.0.0.1:XXX2/
    

    You'd then access the Tomcat resources by prefixing a /tomcat/ to the URL path.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 运筹学中在线排序的时间在线排序的在线LPT算法
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧