Welcome! Log In Create A New Profile


proxy_pass to another server

Posted by thesav 
proxy_pass to another server
August 17, 2016 06:32PM
Hi all! I've already got a working Nginx install running, and I'm wishing to expand it to talk to a different service on another internal web server, but I cannot seem to get it to work..

My network config is:

Nginx Server:
Lubuntu 16
Various local web services on various individual ports installed locally
Nginx installed (each current location block points to
IP = 192.168.x.x

Lubuntu 16
One web service running
Nginx is not installed, just the web service
IP = 192.168.x.y

All machines are running on the same subnet and each web service is running on it's own non-conflicting port.
Each machine can access each other happily.
I can access all services across each of the two servers, directly in a web browser, from any internal machine (eg Win10 PC, iPhone etc), including from the servers themselves.

What I assumed I'd need to add to the Nginx config was something like the following:

location /otherwebservice {
proxy_pass http://192.168.x.y:10000; #Example code here

But this doesn't work :(

Can anyone help me sort this out please? Or point me in the direction of another post that shows a resolution to this?
Perhaps I need to install Nginx on the 2nd server as well? Or perhaps I need something different than proxy_pass? Or more options as well?

Thanks so much Nginx champs!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 196
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