开发者

Best single server solution for GWT, PHP, and 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 ro开发者_C百科uter/gateway and forwarded to each correct port?


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.


Resin is a Java application server with a full PHP5 implementation.

http://quercus.caucho.com/


Just completing the answer given by Jon, take a look to this configuration to serve the Tomcat applications from Apache.


Tomcat, it seems, can run PHP. Found that answer on another Thread which points to this handy tutorial. I'd still like to know if anyone has another solution?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜