| name | cis-apache-4.2 |
| description | Ensure Appropriate Access to Web Content Is Allowed |
| category | cis-apache |
| version | 3.6.0 |
| author | cyberstrike-official |
| tags | ["cis","apache","linux","access-control","directory"] |
| cis_id | 4.2 |
| cis_benchmark | CIS Apache HTTP Server 2.2 Benchmark v3.6.0 |
| tech_stack | ["linux","apache"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Ensure Appropriate Access to Web Content Is Allowed
Description
In order to serve web content, the Apache Allow directive will need to be used to allow for appropriate access to directories, locations, and virtual hosts that contain web content.
Rationale
The Allow directive may be used within a directory, a location, or other context to allow appropriate access. Access may be allowed to all, or to specific networks, hosts, or users as appropriate.
Impact
None documented
Audit Procedure
Perform the following to determine if the recommended state is implemented:
- Search the Apache configuration files (
httpd.conf and any included configuration files) to find all <Directory> elements.
- Ensure there is a single
Order directive with the value of Deny, Allow for each.
- Ensure the
Allow and Deny directives have values that are appropriate for the purposes of the directory.
The following commands may be useful to extract <Directory> and <Location> elements and Allow directives from the apache configuration files.
$APACHE_PREFIX/conf/httpd.conf $APACHE_PREFIX/conf.d/*.conf
$APACHE_PREFIX/conf/httpd.conf $APACHE_PREFIX/conf.d/*.conf
$APACHE_PREFIX/conf.d/*.conf
Remediation
Perform the following to implement the recommended state:
- Search the Apache configuration files (
httpd.conf and any included configuration files) to find all <Directory> and <Location> elements. There should be one for the document root and any special purpose directories or locations. There are likely to be other access control directives in other contexts, such as virtual hosts or special elements like <Proxy>.
- Add a single
Order directive and set the value to .