Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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;
} 
share|improve this answer
    
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 8:39
    
apparently nginx does a better job than mod_proxy.... ty for the headsup –  sokie Oct 15 '12 at 10:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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