The Apache configuration files

You can configure the Apache HTTP web server to set server parameters and virtual hosts. The httpd service, by default, reads the configuration files after start.

Table 1. The httpd service configuration files
Path Description

/etc/httpd/conf/httpd.conf

The main configuration file.

/etc/httpd/conf.d/

The main configuration directory provides an auxiliary directory for configuration files.

/etc/httpd/conf.modules.d/

The auxiliary directory for configuration files which load installed dynamic modules packaged in Red Hat Enterprise Linux. In the default configuration, processing of these configuration files is on priority.

Although the main configuration file is suitable for most situations, you can also use other configuration options.

For any changes to take effect, restart the web server first. Create a backup of the configuration file before editing it to revert any changes.

To check the configuration for possible errors, enter:

# apachectl configtest
Syntax OK

For details, see the apachectl(8) man page on your system.