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 am trying to use the mod_proxy_ajp to forward all the request from to here is what the tomcat server.xml looks like:

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

and here is the apache.conf config:

<VirtualHost *:80>
        ErrorLog logs/
        CustomLog logs/ common
        <Proxy *>
                AddDefaultCharset Off
                Order deny,allow
                Allow from all
        ProxyPass / ajp://example:8009/
        ProxyPassReverse / ajp://example:8009/

but it is not working, any idea?

share|improve this question

migrated from Jul 19 '12 at 11:43

This question came from our site for pro webmasters.

Aren’t you just missing .com from your urls in your ProxyPass lines? – matt May 20 '12 at 15:20
Is there any information in your logs? – Jenny D Jul 19 '12 at 12:01

[first half of answer removed; misread question]

(in shell)

$ tcptunnel --local-port=PORT --remote-host=IP-TO-TOMCAT --remote-port=8009
share|improve this answer
i don't want to redirect all connection from a port to another , i want to redirect specific hostname to another port, kind like of an load balancer maybe?is squid good for this? – dannynjust May 20 '12 at 3:31
Only one service can run on one port, so if port 8009 is in use by the ajp:// protocol, then TCPTunnel should still work. You run that on the Apache server. Any other port in use on the Tomcat server would not be proxied. – ionFish May 20 '12 at 14:21

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.