Welcome! Log In Create A New Profile

Advanced

Proxy redirect to another local IP

Posted by steprog 
Proxy redirect to another local IP
June 14, 2014 12:43PM
Dear all,
I'm new to the world of nginx and not skilled at all.
I managed to make it run on my server (.0.200) with the current configuration:

server {
listen *:9999;
server_name 192.168.0.200
location / { root /var/www/; } # simple index.html
location /headphones { proxy_pass http://192.168.0.200:8181/headphones; }
} # a proxy redirect of a service running my server and it is working

I've struggled to configure another proxy redirect without success.

1st: on the same network I have a phone (http://192.168.0.100/login.html)
I've tried with
location /phone/ { proxy_pass http://192.168.0.100:80/; }
but when I browse http://192.168.0.200:9999/phone/ I'm redirected to http://192.168.0.100/login.html while I would expect http://192.168.0.200:9999/phone/login.html

Someone can suggest me how to proceed

thanks for your patience.
kind regards
stef



Edited 1 time(s). Last edit at 06/14/2014 12:52PM by steprog.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready