0

I would like to set up a conf file, which basically listen to all request on a specific port on the nginx server, and all these request should be forwarded to a another group of servers which handle these request.

My set up is like this :

  • nginx.conf -> just the normal default coming after installation.

and the content of :

  • /etc/nginx/conf.d/load-balancer.conf
upstream backend {
    server 10.0.0.1:8080 max_fails=3;
    server 10.0.0.2:8080 max_fails=3;
    server 10.0.0.3:8080 max_fails=3;
}

server {
    listen 8081;

    location / {
        proxy_pass http://backend;
    }
}

Currently this set up is not working as expected; because when we are contacting NGINX server on port 8081 , we do not get any answer from one of the servers in 10.X range. But if I contact directly the server 10.X with the port 8080 , I got properly a response.

Additional info , we are running RedHat 7.9 and nginx 1.20.1.

What am I missing ? Any idea ?

Thanks.

I ve tried with different port on nginx server but not working.

adamski
  • 3
  • 3

0 Answers0