Why is Apache not proxying to Tomcat?
Two things:
-
The
redirectPort="8443"
attribute for the AJP Connector in Tomcat'sserver.xml
is for SSL connections. Since I'm still working on the basic connection, I haven't enabled SSL yet, so this should beredirectPort="8080"
-
Between the two versions of Tomcat that I'm using, the attribute
secretRequired
for the AJP Connector was changed from a default offalse
to a default oftrue
. Since I wasn't sending a password with the proxy connection, it failed. Discovered this when I finally remembered to check the Tomcat logs, too (/var/log/tomcat9/catalina.{date}.log
on Ubuntu).
The following AJP config works and allows me to load the webapp reverse-proxied through Apache:
<Connector protocol="AJP/1.3"
port="8009"
redirectPort="8080"
enableLookups="false"
URIEncoding="UTF-8"
secretRequired="false" />