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

When I try to connect to my Tomcat server on http://<servername>:8080 it works fine, but from another ISP provided it gives the following error:

HTTP through a proxy server is not allowed.

Some ISP apparently don't allow http over the port 8080, as they think the client uses a proxy.

I also have a httpd running on port 80 for my website.

So in order to avoid the proxy error, I would like to make to following routing:

  • If the user connects to http://<servername>, then the website is served via apache.
  • If the user connects to http://<servername>/AppName, then the port is rerouted to 8080, without the client (or his ISP) knowing.

Is that possible (using iptables or something else) ?

Thank you

share|improve this question
up vote 1 down vote accepted

What you need to use is Apache's mod_proxy (and mod_proxy_ajp for 2.4) and specifically the ProxyPass configuration:

ProxyPass /AppName http://<servername>:8080

This will proxy that connection on the server and pass it to the backend server on port 8080.

share|improve this answer
perfect ! thanks. – Majid Laissi Nov 19 '12 at 22:36

What about simply using a different port?

share|improve this answer
Well I stopped httpd and tried to start Tomcat on port 80, but there were some permission issues. And probably the ISPs won't allow anything but the port 80 for HTTP. – Majid Laissi Nov 19 '12 at 22:03
Try a different port than 80. Anyway, if the ISP blocks it there must be some type of security reason. I'm just a little concerned that you are trying to bypass this. – mdpc Nov 19 '12 at 22:11
well if the access to the port 80 is allowed by the ISP, then there's nothing to be concerned about. The User will still connect to my server via the port 80 and the routing i'm looking for is internal to my server. – Majid Laissi Nov 19 '12 at 22:17

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.