There are two (2) separate, independent "vulnerabilites" that the security scan looks for in apache servers. Either or both may be reported for your server. Here are some notes on how to fix them.
This one is relatively easy to fix.
Fixing this one is often straightforward, but can be more complicated. If your webserver is running the tomcat "java servlet container" (as, for example, some elog installations do), be sure to see the final section. If you think you have fixed apache, but still have "trace enabled" on port 8080, again, check the tomcat notes below.
Update: For apache version 1.3.34 (or later 1.3.x versions),
or apache 2.0.55 (or later), this has been made easy. In section 1,
just add the line
TraceEnable off
For older versions of apache, see below.
# Block access: SLAC addition
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
# End block access rule
to the Main Server Config (section 3) AND to each and every virtual host defined in your config. Or, if you have the block in the main host config, you can just add the following to the virtual host(s) config(s):
RewriteOptions inherit
If you don't have any virtual hosts, then you only need it in the main server config. If you are using SSL, you most likely have a virtual host defined for that, and will need it there. NOTE: if you are running Apache 2, there is often an SSL virtual host defined by default in a separate file: conf.d/ssl.conf . You'll need to add the lines there, too (or get rid of the virtual host, if you don't need it). Security will normally tell you which port(s) the problem is on; port 443 will indicate it is an SSL host.
For the curious: The first and last lines are just comments; the second line insures that the rewrite module is 'on'; the next line says that any 'trace' (or 'track') request should be rewritten; the fourth line says that what the request should get instead of a trace/track is the 'forbidden' error page.
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75" allowTrace="false"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>
Author: John Bartelt