Re: Apache ProxyPass does not return errors, only 500 (Internal Server Error)

1.505 visualizações
Pular para a primeira mensagem não lida

Thomas Broyer

não lida,
19 de abr. de 2013, 17:39:1919/04/2013
para google-we...@googlegroups.com


On Friday, April 19, 2013 9:20:49 AM UTC+2, Gregor Kovač wrote:

I have two ProxyPass directives:

ProxyPass /client/ http://10.0.0.8:8080/client/
<Location /client/>
    RequestHeader edit X-GWT-Module-Base ^(.*)/client/(.*)$ $1/client/$2
</Location>

ProxyPass / http://10.0.0.8:8080/client/
<Location />
    RequestHeader edit X-GWT-Module-Base ^(.*)/(.*)$ $1/client/$2
</Location>

10.0.0.8 is running Glassfish on port 8080 and http://10.0.0.8:8080/client/ is URL to a GWT based application. Both proxy's work OK ,except when it comes to an error on the Glassfish side. If I go via /cllient/ proxy then I see the actual error that was produced on the Glassfish side. If I go via / proxy then I only see "Error 500 The call failed on the server, please see server log". I've tried settingProxyErrorOverride Off, but it didn't help.

Why don't I see the error via / proxy? I think that the X-GWT-Module-Base header gets edited wrong. This apache configuration is done by https://code.google.com/p/google-web-toolkit/issues/detail?id=4817#c4


Assuming X-GWT-Module-Base contains http://myserver/foo/bar, there's no reason it wouldn't be rewritten as http:/client//myserver/foo/bar, http://client/myserver/foo/bar or http://myserver/foo/client/bar instead of the http://myserver/client/foo/bar you're expecting.
You have to rework your regexp. Maybe mapping something like ^(https?)://([^/]+)/(.*)$ to $1://$2/client/$3

Gregor Kovač

não lida,
29 de abr. de 2013, 02:40:4729/04/2013
para google-we...@googlegroups.com
I'm using 
RequestHeader edit X-GWT-Module-Base ^(http)://([^/]+)/(.*)$ $1://$2/babyCenter/$3

and it works. :) Thanks a lot.

Dne petek, 19. april 2013 23:39:19 UTC+2 je oseba Thomas Broyer napisala:
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem