apache2mod-proxymod-jk

Apache Web Server : ProxyPass and ProxyPassReverse


I have scanned through the internet and also stackoverflow and I'm still not sure of the purpose of proxypass and proxypassreverse.

Why do we need proxypass (instead of using mod_jk) for apache server to connect to tomcat?


Solution

  • Nice link on SO:: apache to tomcat: mod_jk vs mod_proxy

    1.One reason can be to use mod_proxy to include other servers while maintaining fancy URLs.

    2.Other advantage can be that when you are using tomcat as server, the mod_proxy_ajp module has the ProxyPassReverseCookiePath directive, which allows you to map the session cookies of a Tomcat web application (other than the root application) into the root of a virtual host.

    3.Mod_proxy simply redirects requests for certain URLs to another web server, so it typically requires no additional configuration on the application server.

    Also, see http://www.humboldt.co.uk/2009/02/the-mystery-of-proxypassreverse.html