1

i am trying to use the mod_proxy_ajp to forward all the request from tocat.example.com to example.com:8080 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>
        ServerName tomcat.example.com
        ServerAdmin amdin@gmail.com
        ErrorLog logs/tomcat.example.com-error_log
        CustomLog logs/tomcat.example.com-access_log common
        <Proxy *>
                AddDefaultCharset Off
                Order deny,allow
                Allow from all
        </Proxy>
        ProxyPass / ajp://example:8009/
        ProxyPassReverse / ajp://example:8009/
</VirtualHost>

but it is not working, any idea?

danny
  • 121
  • 4

1 Answers1

0

[first half of answer removed; misread question]

http://www.vakuumverpackt.de/tcptunnel/

(in shell)

$ tcptunnel --local-port=PORT --remote-host=IP-TO-TOMCAT --remote-port=8009
ionFish
  • 315
  • 2
  • 11
  • 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? – danny May 20 '12 at 03: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