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条)

报告相同问题?

悬赏问题

  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app