apache front end using mod_proxy_ajp to tomcat on different servers

Posted by user302307 on Stack Overflow See other posts from Stack Overflow or by user302307
Published on 2010-04-21T01:58:27Z Indexed on 2010/04/21 2:03 UTC
Read the original article Hit count: 295

Filed under:
|
|

Anyone knows the steps to run Apache on server A as front end and run mod_proxy_ajp to connect to tomcat instances on server B? I want to run apache on sever A to do name based vhost that connects to many tomcat servers.

I can run mod_proxy_ajp, only if apache and tomcat are on the same server.

What I've tried so far:

In server A, running Apache 2.2:

NameVirtualHost *:80

ServerName tc0.domo.lan ErrorLog "C:\Apache\Apache2.2\logs\tc0.ajp.error.log" CustomLog "C:\Apache\Apache2.2\logs\tc0.ajp.access.log" combined

DocumentRoot C:/htdocs0

AddDefaultCharset Off
Order deny,allow Allow from all

ProxyPass / ajp://192.168.77.233:8009/ ProxyPassReverse / ajp://192.168.77.233:8009/

Options FollowSymLinks AllowOverride None Order deny,allow Allow from all

Server B: 192.168.77.233, tomcat 6 connector:

I can confirm if going to http://192.168.77.233:8080/manager/html, tomcat works.

When I use packet sniffer on server A, I found that server A is trying to connect to server B at port 80 when I'm connecting http://tc0.domo.lan/manager/html on server A

© Stack Overflow or respective owner

Related posts about tomcat6

Related posts about mod-proxy