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

Sorry if this has been posted/answered already, but I cannot find the simple answer.

I have two applications one JSP and one PHP both hosted on same machine running apache and tomcat. Apache is listening on 80 and tomcat on 8080.

Where can I get a step-by-step guide to have the urls pointed to specific app. I am not savvy when it comes to linux and apache settings.

All the information I have found so far either leads me to another complicated link or somehow the instructions cannot be followed.

Please help.

share|improve this question

Well, you can do it in two ways:

  1. Using apache mod_rewrite to rewrite the URLs, it's not very easy but works
  2. Using something in front of apache to provide a reverse proxy. nginx is a very popular option, very fast and easy do configure. Varnish is a caching reverse proxy, it's harder to configure than nginx but provides cache.

There are some examples: nginx full example, Varnish config examples, apache rewrite guide.

IMNSHO, nginx is the best choice if you will not have thousands of accesses, if this is the case, nginx + varnish can do miracles.

share|improve this answer

Your Answer


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