Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from webmasters.stackexchange.com 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
add comment

1 Answer

[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
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
add comment

Your Answer

 
discard

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.