Troubleshooting Reverse Proxy Configurations
In the Tomcat server.xml file you can add more debug logging to get access to the values of the various reverse proxy HTTP headers in the access log. To do that, modify the default AccessLogValve configuration to include the headers you want to log. in the following example Host, X-Forwarded-For and X-Forwarded-Proto with their respective values:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b Host: %{Host}i X-Forwarded-Port: %{X-Forwarded-Port}i X-Forwarded-Proto: %{X-Forwarded-Proto}i" />
Depending on the installation method you have to maintain caution concerning the quoting and escaping of the pattern since it contains special characters. If you are using the Cadenza Helmchart be sure to use at least the versions >=11.0.1, >=10.5.3 or >=10.4.8 and use the following setting in the values (be sure to use these exact quotes and escape sequences):
cadenza:
additionalJavaOpts: '-Dnet.disy.cadenza.web.accesslog.pattern=%h %l %u %t \"%r\" %s %b Host: %{Host}i X-Forwarded-Host: %{X-Forwarded-Host}i X-Forwarded-Port: %{X-Forwarded-Port}i X-Forwarded-Proto: %{X-Forwarded-Proto}i'