A late reply to this topic... Without the conditional test provided by the Rewrite (native Tomcat 8 Rewrite or url-rewrite), it is possible to use an Apache in front of the Tomcat which will have two ProxyPass, and two virtual hosts on the Tomcat itself (one servicing anything but the healtheck, the other one for the healthcheck without logging valve). As the wildcard is not supported by ProxyPass, we can use ProxyPassMatch for this purpose.
Apache : ProxyPassMatch ^/(.*)/iaahb http://localhost:8081/$1/iaahb ProxyPassMatch ^/.*$ http://localhost:8080/ Tomcat server.xml : <Service name="Catalina1"> <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> </Host> </Engine> </Service> <Service name="Catalina2"> <Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> </Host> </Engine> </Service> ------------------------------------ Chris, Quick question, I upgraded to 7.0.54 with new user/pass. My issue is that these credentials will not log me in to ANY management function going through the GUI??? If I append the WEBAPP Tho the url http://localhost\web app name this launches the app - but still I need to access all CmcApps via the GUI. Any ideas? Thanks, Keith Pendergrass (CIV) MS/ MBA/ Network+ IT Specialist (APPSW) Software/Data Engineer Space & Naval Warfare Systems Command-Atlantic 2251 Lakeshore Drive New Orleans, La 70122 Work: (504) 697-5549 DSN: 647-5549 Fax: (504) 697-5628 keith.pendergr...@navy.mil -----Original Message----- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, July 22, 2014 9:09 AM To: Tomcat Users List Subject: Re: Conditional logging -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Kris, On 7/21/14, 6:43 PM, Dames, Kristopher J wrote: > Can anyone point me to an example of conditional logging in Tomcat 6? > Here is what I have tried to no avail. I want requests that match > /*/iaahb to not be logged. > > In my server.xml: > > <Valve className="org.apache.catalina.valves.AccessLogValve" > condition="DoNotLog" directory="logs" fileDateFormat="yyyy-MM-dd" > pattern="%{X-Forwarded-For}i %h %l %u %t "%r" %s %b > "%{Referer}i" "%{User-Agent}i"" > > prefix="access_log"/> > > in my web.xml: > > <!-- Custom filter to prevent logging health check requests --> > <filter> <filter-name>Set Do Not Log Attribute</filter-name> > <filter-class>SetDoNotLogFilter</filter-class> <init-param> > <param-name>DoNotLog</param-name> <param-value>true</param-value> > </init-param> </filter> <filter-mapping> <filter-name>Set Do Not Log > Attribute</filter-name> <url-pattern>/*/iaahb</url-pattern> > </filter-mapping> On the face of it, this looks like it should work. What does your "SetDoNoLogFilter" code look like? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTznCUAAoJEBzwKT+lPKRYlKQQAKFrkhuDlohUc71mm0iBQXRl jOcU4LD1Coq2m+dtQscGdgbwJ7vvr3wCGLFjJ+k6SPGkDDon1N0xQ/RsXApFFvme KqR3B851de9TtZlAiCgRJsWnvoXNMsSp8aeQxcwV1hSj/s9agDd8hHQj9ffw+Hnu E9wcw4uFlM0+cDvqc6lMlP2P1lgj9F0UWmzcQFw1p3iUxUiiOsXXXBls5KlLtT7D Si/69y/Ul0FOy9kvNl/W1EPVZcKEE6c3r4/UAYaLoZmxtKFIa6FkKVJGW3oK16PH F2mTPnYLwNN3fSEwaJEMlmAUg58UfSkTdMtIaARbMD0SC34zeHqipVOMJ5mwtSuJ XYAgD1euYzGmwewQL1Xi/pqdWngplFuJNnBeMgxUaQdw3p6WwWgdl2CN/FPfYkjo R/VW01flR+UlkavQjcKi/uv9fDy0Y2Hn+q1wFtOVqwxcDIa8bdKm00KllYNRClhz Ddu+xMg55LkZi/qeMUan8YNidNH1RiXa74A5i4BR7VLf5jtO+j0FHxx9H1WDbkNp O887mfSrU75zgr1ACg8yoPpw5lVfqBYfhkfa2Clf6eNQWgBs3Ki6KZzH/f1dEM4S YVo7T+1yESMvLTb2fK5J5wJv/WIuZWUfNY6n7r9vOjxj61lo7q6UjutYeNO746N1 hSIMjlfwoc0IeqGMB0M3 =k8cT -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org