How to remove detailed error reports and server info from the HTML replies from Apache Tomcat servers - WKB240505
Article number: 240505
OBJECTIVE or GOAL
Reconfigure Apache Tomcat so that it does not include detailed error reports, stack traces, and server info in the HTML replies for HTTP error codes.
ENVIRONMENT
- NuGenesis 9 SDMS
- Apache Tomcat 9.0.x
PROCEDURE
- Open the Apache Tomcat server.xml file in Notepad:
- Drive:\Program Files (x86)\Waters\apache-tomcat-9.0.X\conf\server.xml
- Add the following lines to the file, above the "<Context" entry for /ngaudit/servlet/ and below the closing tag for the AccessLogValve:
- <Valve className="org.apache.catalina.valves.ErrorReportValve" showReport="false" showServerInfo="false" />
- Save and close the file.
- Restart the Apache Tomcat service at a suitable time.
ADDITIONAL INFORMATION
id240505, SDMS, SDMS8, SDMS8NU, SUPISDMS, SUPNG