1

I have one instance of jboss and one instance of jetty on the same server,so same ip,one is on port 8180 one on 8280.I am planning on setting up nginx on port 80,is it possible to route data to either one based on url? like ip/jboss and ip/jetty and route trafic to either one?

sokie
  • 113
  • 4

1 Answers1

2

Yes you can use the nginx HttpProxyModule to proxy_pass based on location e.g.

location /jboss/ {
    proxy_pass http://yourhost.tld:8180;
} 


location /jetty/ {
    proxy_pass http://ip.add.re.ss:8280;
} 
user9517
  • 115,471
  • 20
  • 215
  • 297
  • Thanks a lot for your prompt answer,i will try it out.What about resources,will images,javascript ecc keep correct path?i had apache proxy and had a lot of problems with that – sokie Oct 15 '12 at 08:39
  • apparently nginx does a better job than mod_proxy.... ty for the headsup – sokie Oct 15 '12 at 10:22