Nginx and Websphere

Francis Daly francis at daoine.org
Wed May 27 13:33:04 UTC 2015


On Wed, May 27, 2015 at 07:27:25AM -0400, sampy wrote:

Hi there,

> What does "doesn't work" mean?
> 
> web browser don't show the web and appears the error  "webint don't exists
> in DNS", but query arrives to the balanced server

You see "webint", but you include "proxy_set_header Host $host;" in
your config?

That is unexpected to me.

Could you show the response to

  curl -i http://web.domain.com/

from your client machine? Perhaps there is more than one redirection
happening.

> What response did you want to get instead?
> 
> Oviously the web 

What http response? A 301 redirect to a different url; or a 200 with
some specific content?

(Assume that I don't know anything about WebSphere.)

> What response do you get if you do
> 
> curl -H Host:web.domain.com -i http://wasint-1.domain.com:9080/WebApp
> 
> from the nginx server?
> 
> HTTP/1.1 302 Found
> 
> X-Powered-By: Servlet/3.0
> Location: http://web.domain.com:9080/WebApp/
> Content-Language: es-ES
> Content-Length: 0

Ok - after you show the response from the new curl command above --
the one that you make of your nginx server directly -- it might become
clear whether that Location: header is being modified, or what it should
be modified to be.

http://nginx.org/r/proxy_redirect may be useful. (Or just removing the
"proxy_set_header Host $host;".)

> Does that match one of the previous two answers?
> 
> Yes, but don't. Let me explain. It appears that the proxy_pass works,
> because adds the port and /WebApp, but don't show the web that is served in
> the host.

One request gets one response.

Take the requests one at a time, and the path to the desired end state
may become clear.

(For example: I suspect that you may want to change the proxy_pass to be
just to "http://webint", and you may want an extra "location=/{return 301
/WebApp/;}", but the response from the first few requests will probably
show whether or not that is useful.)

Cheers,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list