Nginx and Websphere

Francis Daly francis at daoine.org
Thu May 28 18:00:00 UTC 2015


On Thu, May 28, 2015 at 11:50:30AM -0400, sampy wrote:
> Francis Daly Wrote:

Hi there,

>  upstream webint {
>                 ip_hash;
>                 server wasint-1.carreras.sa;

Just to confirm: no ":9080" on that one? It probably means that a second
proxy_redirect will be needed; added below.

>                 server wasint-2.carreras.sa:9080;
>         }
> 
>     server {
> 
>         listen 80;
>         server_name web.domain.com;
> 
> 
>         location / {
>                 #proxy_set_header Host $host;
>                 proxy_set_header X-Real-IP $remote_addr;
>                 proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
>                #proxy_redirect http://webint/WebApp /;
>                 proxy_redirect http://webint /;

There is no "proxy_pass" here, so the rest of the configuration is
effectively unused and the request is served from the filesystem --
which explains the responses you get.

Perhaps try instead

  location / {
    proxy_pass http://webint;
    proxy_redirect http://webint/ /;
    proxy_redirect http://webint:9080/ /;
  }

and add the other bits if they are needed.

> >  curl -i http://web.domain.com/
> result: default nginx web

That should become "whatever the webapp returns for a / request". If it
is not a redirect to /WebApp/, it can be fixed later.

> >  curl -i http://web.domain.com/WebApp/
> result:

That should become a sensible response -- hopefully a redirect to
http://web.domain.com/WebApp/main.jsf.

If you do get that, they you can try

  curl -i http://web.domain.com/WebApp/main.jsf

to see what happens next; or just try it in your normal browser.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list