Securing the Apache HTTP Server
The Apache HTTP Server is one of the most stable and secure services that ships with Community Enterprise Linux. A large number of options and techniques are available to secure the Apache HTTP Server - too numerous to delve into deeply here.
When configuring the Apache HTTP Server, it is important to read the documentation available for the application. This includes Apache HTTP Server, and the Stronghold manuals, available at http://www.redhat.com/docs/manuals/stronghold/.
System Administrators should be careful when using the following configuration options:
This directive is enabled by default, so be sure to use caution when creating symbolic links to the document root of the Web server. For instance, it is a bad idea to provide a symbolic link to This directive is enabled by default, but may not be desirable. To prevent visitors from browsing files on the server, remove this directive. The These directives activate user directory browsing for all user directories other than By default, the Server-Side Includes (SSI) module cannot execute commands. It is recommended that you do not change this setting unless absolutely necessary, as it could potentially enable an attacker to execute commands on the system. Ensure that only the root user has write permissions to any directory containing scripts or CGIs. To do this, type the following commands:
Always verify that any scripts running on the system work as intended before putting them into production.
FollowSymLinks
/
.The
Indexes
DirectiveThe
UserDir
DirectiveUserDir
directive is disabled by default because it can confirm the presence of a user account on the system. To enable user directory browsing on the server, use the following directives:
UserDir enabled
UserDir disabled root
/root/
. To add users to the list of disabled accounts, add a space-delimited list of users on the UserDir disabled
line.Do Not Remove the
IncludesNoExec
DirectiveRestrict Permissions for Executable Directories
chown root
<directory_name>
chmod 755
<directory_name>