пятница, 12 октября 2012 г.

Tomcat 6. Remove version information from error pages.

When Tomcat 6 encounters error like 404 it displays the error page which also reveals Tomcat version. It is bad in production, because some people can attack vulnerabilities in software. So, to make this task difficult it is better to mimic the version information in error page.

In your CATALINA_BASE\lib directory create dirs org/apache/catalina/util. Then, create the file ServerInfo.properties with the following properties:
server.info=Apache
server.number=1.2.3.4
server.built=18 nov 2012 23:59:59
 
Restart the Tomcat. Now Tomcat error pages won't contain version information.

Комментариев нет:

Отправить комментарий