Port restore problem of reverse proxy after login.
Reinis Rozitis
r at roze.lv
Sat Nov 6 08:14:21 UTC 2021
> The intranet website 10.8.10.220:2021 need login with specific username
and password. After I open http://my.domain.xyz:8888 and then do the login,
the URL always changes to the following form:
> http://my.domain.xyz:2021
>
> This will cause subsequent operations to fail. Is there any way to
continue using port 8888 to solve this problem?
Depending on what the application does in the background you can try to
disable the port change on redirect with port_in_redirect off;
http://nginx.org/en/docs/http/ngx_http_core_module.html#port_in_redirect
Though if the application includes its own port (in absolute url) in
code/html it might not help and then the only way (if it is not possible to
change the app itself) is to alter the content with sub_filter module on the
fly.
rr
More information about the nginx
mailing list