On 06.04.2021 00:45, James H. H. Lampert wrote:
On 4/5/21 1:22 PM, Christopher Schultz wrote:
If you are not running a reverse-proxy in front of Tomcat, then it does absolutely
nothing for you.
If you *are* running a reverse-proxy in front of Tomcat, then it *may* do something for
you, depending upon what software you are using and what its configuration is.
Thanks.
Hmm. We have *something* on one of our cloud servers, that has Tomcat sitting behind httpd
(on the same box), and we have load balancing (through a couple of AWS Beanstalks) on our
cloud-based product, but I don't know if the AJP port is involved in any of that.
I don't know about AWS Beanstalks, but for Apache httpd, there are some tell-tale
configuration directives in the Apache httpd configuration files, which - if present -
will tell you if Apache httpd is communicating with the back-end tomcat using the AJP
protocol (and hence tomcat's AJP Connector).
Look for either of :
- ProxyPass instructions mentioning "AJP:"
- SetHandler jakarta-servlet
- JkMount
(case does generally not matter)
(Note that under Linux(es), your Apache httpd config files may be spread in small chunks
all over the place, generally in locations such as "/etc/apache2/*" or "/etc/httpd/*") (*)
Relevant documentation is available here :
1) http://tomcat.apache.org/connectors-doc/
2) http://tomcat.apache.org/connectors-doc/reference/apache.html
3) http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass
4) (more complicated cases)
http://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewriterule
Also, if Apache httpd uses AJP to communicate with tomcat, then either one of these Apache
httpd add-on modules will be loaded and configured :
- mod_jk
- mod_proxy_ajp
To find out which modules are loaded by Apache httpd, use the following command
:
# apache2ctl -M
(Note that the mere fact that a module is loaded, does not necessarily mean that it is
being *used*; but if neither of them is loaded, then you can be pretty sure that Apache
httpd is NOT using AJP)
Shortcut :
- comment-out the AJP Connector in the tomcat configuration
- restart tomcat
- and wait for desperate support calls
(*) This is not a critic : it is very flexible that way; it's just a bit more work to
search for the right files.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org