Internal application - Publish on nginx
Francis Daly
francis at daoine.org
Fri Dec 3 15:59:39 UTC 2021
On Fri, Dec 03, 2021 at 10:05:57AM -0500, agomes wrote:
Hi there,
> in my location /app I have this configuration.
>
> location /app {
> proxy_pass https://resetpass/pwm/public/forgottenpasswordapp;
> #rewrite ^/(.*)/pwm/public$ /$1 break;
> proxy_redirect /pwm/public/forgottenpasswordapp /app;
> #proxy_set_header Host $host;
> }
>
> when I run the curl -v command I have this output.
>
> root at ubuntu-server:/home/agomes# curl -v https://x.x.x.x/app
> < Location: https://x.x.x.x/app?stickyRedirectTest=key
> < Set-Cookie: JSESSIONID=D70474FE95784C0A07C659A05D224233; Path=/pwm;
> < Set-Cookie: ID=yiElg4A1ZZXYfaMTaNsCOzLDDq1v6xtYkwqvhuxh; Path=/pwm/;
>
> In the browser bar I have this https://x.x.x.x/app?stickyRedirectTest=key
>
> internally on the application everhthing works very well.
The proxy_redirect has changed the Location: response, which is good.
What does
curl -v https://x.x.x.x/app?stickyRedirectTest=key
return?
Can you see in your browser "developer tools console" what series of
requests and responses are made when things work using the internal
system directly; and how far in that sequence does it get when you go
through nginx?
I suggest trying (in the short term, at least)
proxy_cookie_path ~^/pwm.* /app;
in the same location{} block, and seeing if that makes any useful change
to the response when the browser goes through nginx.
Cheers,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list