Saturday, September 25, 2010

Re: Reverse proxy problem once again

Hi pete,

I got along quite well with mapping localhost:80/bla/ to localhost:
8080/bla in the httpd.conf - i.e. keeping the context path as it is.
No more action is necessary then. (you could set up a redirect rewrite
rule for path / so the user gets forwarded). This is the most simple
solution I know. Maybe (I'm not sure now), you could rewrite the
context path as well with mod_rewrite but that's no more than a vague
guess. Otherwise, you'd indeed have to overwrite
doGetSerializationPolicy on the servlet which is just what you don't
want.

So, I'd try the redirect rewrite rule (check out
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html and search for
"force redirect" on the page)...

Hope this helps - best regards
Sebastian Rothbucher


On 17 Sep., 20:46, pete <superp...@geekcity.de> wrote:
> Hallo,
>
> I've looked around several hours to solve this problem, but I just
> can't figure it out (even though I find many similar posts and tips
> about it). The set up is quite simple, I have my GWT-Module running athttp://localhost:8080/blaand if I address it like this, everything
> runs fine.
> I furthermore have an Apache2 set up, with the following rule
>
> <VirtualHost *:80>
>         ServerAdmin webmaster@localhost
>         ServerName localhost:80
>         ProxyPass /http://localhost:8080/bla/
>         ProxyPassReverse /http://localhost:8080/bla/
> </VirtualHost>
>
> (mod_proxy, etc. is loaded, <proxy> is configured in httpd.conf)
> So I just want to forward from localhost:80 to localhost:8080/bla,
> which shouldn't be such a pain in the a** as one should thing. But the
> SOP prevents the RPC mapping, failing to retrieve the
> SerializationPolicy. I can load the page, but the first RPC fails with
> the usual exception so often explained in various posts.
>
> My question is just, isn't there a way, to fix this simple case
> without overriding RemoteServiceServlet? I would really wanna avoid
> messing with that, and prefer some other way, maybe via proxy
> configuration? Or web.xml? Or module.gwt.xml?
> I also found this:http://code.google.com/p/acris/wiki/SeparateClientAndServer
> Would it be worth it to adapt my project with acris to achieve what I
> want?
> The paths basically need to be as in my setup above...
>
> About any help I would be glad :-)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment