Welcome! Log In Create A New Profile

Advanced

Reverse proxy if target server does redirect

Posted by benkrebs 
Reverse proxy if target server does redirect
June 23, 2019 06:57AM
Hi all,
I want to have Nginx as reverse proxy into my smart home.
E.g. the location home shall reverse proxy my Homematic system:

location /home/ {
proxy_pass http://192.168.23.120/;
}

What the target (which I reach nicely) does is forward to /pages/index.htm?<sessionID>

Nginx converts that to http://my_nginx_server/pages/index.htm?<sessionID> -> where I get a 404 (which is correct ;-) )

-->how do I have to setup Nginx that it creates http://my_nginx_server/home/pages/index.htm?<sessionID>
-->how can I tell Nginx to proxy a whole substructure of a target server?

Thanks in advance,
Ben



Edited 1 time(s). Last edit at 06/23/2019 06:57AM by benkrebs.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 282
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready