0

Here is my situation: I will have one server running nginx, and two servers running apache + tomcat

I am NOT trying to do any load balancing.

What I need to do is setup nginx to proxy connections to specific servers based on the url. (in Local network)

IE, @IP_of_nginx:4444 should point to server apache , @IP_of_nginx:5555 should point to tomcat server.

I am not that familiar with nginx, but I could not find a specific configuration online that fit my situation.

Thanks

0

Similar config to this should work:

server {
  listen      4444;
  charset     utf-8;
  server_name _;
  location / {
    proxy_pass http://apache:80;
  }
}
server {
   listen     5555;
   charset     utf-8;
   server_name _;
   location / {
      proxy_pass http://tomcat:8080;
   }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.