Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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/ {
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


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.