6.6

Table Of Contents
Apache Configuration
Disable Web Directory Browsing
As a security best practice, ensure that a user cannot bowse through a directory because it can increase the
risk of exposure to directory traversal aacks.
Procedure
u
Verify that web directory browsing is disabled for all directories.
a Open the /etc/apache2/default-server.conf and /usr/lib/vmware-
vcopssuite/utilities/conf/vcops-apache.conf les in a text editor.
b
Verify that for each <Directory> listing, the option called Indexes for the relevant tag is omied
from the Options line.
Remove the Sample Code for the Apache2 Server
Apache includes two sample Common Gateway Interface (CGI) scripts, printenv and test-cgi. A
production Web server must contain only components that are operationally necessary. These components
have the potential to disclose critical information about the system to an aacker.
As a security best practice, delete the CGI scripts from the cgi-bin directory.
Procedure
u
To remove test-cgi and prinenv scripts, run the rm /usr/share/doc/packages/apache2/test-cgi and
rm /usr/share/doc/packages/apache2/printenv commands.
Verify Server Tokens for the Apache2 Server
As part of your system hardening process, verify server tokens for the Apache2 server. The Web server
response header of an HTTP response can contain several elds of information. Information includes the
requested HTML page, the Web server type and version, the operating system and version, and ports
associated with the Web server. This information provides malicious users important information without
the use of extensive tools.
The directive ServerTokens must be set to Prod. For example, ServerTokens Prod. This directive controls
whether the response header eld of the server that is sent back to clients includes a description of the
operating system and information about compiled-in modules.
Procedure
1 To verify server tokens, run the cat /etc/apache2/sysconfig.d/global.conf | grep ServerTokens
command.
2 To modify ServerTokens OS to ServerTokens Prod, run the sed -i
's/\(ServerTokens\s\+\)OS/\1Prod/g' /etc/apache2/sysconfig.d/global.conf command.
Disable the Trace Method for the Apache2 Server
In standard production operations, use of diagnostics can reveal undiscovered vulnerabilities that lead to
compromised data. To prevent misuse of data, disable the HTTP Trace method.
Procedure
1 To verify the Trace method for the Apache2 server, run the following command grep
TraceEnable /usr/lib/vmware-vcopssuite/utilities/conf/vcops-apache.conf.
Chapter 3 Secure Configuration of vRealize Operations Manager
VMware, Inc. 27