Site Navigation:
 
 

2. Getting Started

[Note]This guide is specific to Fedora Core 3 or Red Hat Enterprise Linux 4

While much of the theory in this guide is applicable to other systems, the details of your distribution's default SELinux policy, Apache HTTP configuration, and file system layout may differ. In particular, this guide is focused on the targeted policy, although it does discuss the strict policy as well.

Your first step is to install the httpd package, and probably the httpd-suexec and httpd-manual packages. The selinux-policy-targeted package should be installed by default. If you want to do any policy customization, you should also install the selinux-policy-targeted-sources package.

By default, SELinux enforcement for Apache HTTP is enabled. To verify this, run system-config-securitylevel, and view the SELinux tab. Click on the Transition tree, and ensure that Disable SELinux protection for httpd daemon is not checked.

As a further check, use the command ps axZ | grep httpd. You should see it running in the root_u:system_r:httpd_t security context. The important part of that is the third component, the httpd_t type. Notice that most other processes on your system are running in the unconfined_t type. By running in a separate security context with the httpd_t type, Apache HTTP is confined by SELinux.