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?
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?
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
The ProxyPassReverse is used to change the headers sent to Apache from a proxied app server, before Apache sends it to the browser.
For example, if the app sits on localhost:8080, it will respond with a redirect and location header of http://localhost:8080/new_path/, and Apache will take this and send it off to the browser. The browser will try to send a request to Page on localhost:8080 and receive an error.
ProxyPassReverse will intercept those headers, and rewrite them to match the Apache proxy server.
ProxyPass will create a reverse proxy. A reverse proxy (or gateway), appears to the client just like an ordinary web server. The client makes ordinary requests for content in the namespace of the reverse proxy. The reverse proxy then decides where to send those requests and returns the content as if it were itself the origin.
https://www.quora.com/Whats-the-difference-between-proxypassreverse-and-proxypass
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
© 2022 - 2024 — McMap. All rights reserved.