GWT - PHP on Apache 2nd Review

My latest project doesn't let quercus running on glassfish. I need to to remove quercus before the project can be deployed.

Finally I found a new way to enable data transfer from GWT application on GlassFish Server to Apache Web Server. The solution is simpler. No querchos and curl php script required.

How it can be possible?

Let say the Apache is running on port 80 and glassfish is running on port 8080.
Let say your GWT project is in /web1 folder on glassfish.
Let say your PHP project in in /web1 folder on Apache.

First you need to set Apache proxy settings. You might need to install the module if you don't have one on your Apache.

Open the apache httpd.conf file and add the following lines

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Order deny,allow
Allow from all


ProxyRequests on
ProxyPreserveHost on

ProxyPass /web2 http://localhost:8080/web1/
ProxyPassReverse /web2 http://localhost:8080/web1/


using the setting your GWT project can be access using this following URL

http://localhost/web2

In your GWT project the data can be access using http://localhost/web1. Now it's on the same domain with your GWT project on http://localhost/web2. You can access to any php script on your Apache from GWT without creating any proxy servlet or curl script.

0 comments:

 
Copyright © peyotest