Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 a VPS that had Apache. Later Tomcat was installed with the cPanel EasyApache thing. JSPs will work as or However, JForum uses web.XML to map some servlets to URLs. Without the port 8080 in the URL, I get file not found. Is there any way to get the servlets to map on port 80 like the JSPs without killing Apache?

share|improve this question
up vote 2 down vote accepted

You can use mod_proxy for passing the data over to tomcat.

you could use something in the lines of:

ProxyPass /myservlet http://localhost:8080/myservlet
ProxyPassReverse /myservlet http://localhost:8080/myservlet

That will proxy the data to the tomcat instance and rewrite replies so that they match the given path. I would recommend using something like nginx for plain proxying, but if you already need apache for something, it can be done with it too.

share|improve this answer
Why do JSPs work without having to be proxied? – SJaguar13 Jul 27 '10 at 22:17
Without knowing the full details of your configuration I'm going to assume you use similar configuration as this one: "JkMount /*.jsp ajp13" The *.jsp rule would explain why you can only access jsp pages. If you wish to use mod_jk, you need to mount the poper patterns that you wish to access through apache. The benefit of using ProxyPass is that you can rewrite locations if you need to and when using mod_jk you get to skip a few extra requests on the server side. – Ressu Jul 28 '10 at 8:35
I did, in fact, have the JkMount thing. I added the directory, and now everything is working on port 80. – SJaguar13 Jul 29 '10 at 12:45

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.