httpd.confhttpdAuthorOrtonJoejorton@redhat.comhttpd.conf5httpd.confConfiguration files for httpd/etc/httpd/conf/httpd.conf,
/etc/httpd/conf.modules.d,
/etc/httpd/conf.dDescriptionThe main configuration file for the httpd daemon is
/etc/httpd/conf/httpd.conf. The syntax of
this file is described at , and
the full set of available directives is listed at .
Configuration structureThe main configuration file
(httpd.conf) sets up various defaults and
includes configuration files from two directories -
/etc/httpd/conf.modules.d and
/etc/httpd/conf.d. Packages containing
loadable modules (like ) place files
in the conf.modules.d directory with the
appropriate directive so that module
is loaded by default.Some notable configured defaults are:The default document root from which content
is served.The daemon listens on TCP port 80.Error messages are logged to
@LOGDIR@/error_log.CGI scripts are served via the URL-path .To remove any of the default configuration provided in
separate files covered below, replace that file with an empty
file rather than removing it from the filesystem, otherwise it
may be restored to the original when the package which provides
it is upgraded.MPM configurationThe configuration file at
/etc/httpd/conf.modules.d/00-mpm.conf is
used to select the multi-processing module (MPM), which governs
how httpd divides work between processes
and/or threads at run-time. Exactly one
directive must be uncommented in
this file; by default the MPM is enabled.
For more information on MPMs, see .If using the prefork MPM, the
"httpd_graceful_shutdown" SELinux boolean should also be
enabled, since with this MPM, httpd needs to establish TCP
connections to local ports to successfully complete a graceful
restart or shutdown. This boolean can be enabled by running the
command: semanage boolean -m --on
httpd_graceful_shutdownModule configuration filesModule configuration files are provided in the
/etc/httpd/conf.modules.d/ directory.
Filenames in this directory are by convention prefixed with two
digit numeric prefix to ensure they are processed in the desired
order. Core modules provided with the httpd
package are loaded by files with a prefix
to ensure these load first. Only filenames with a
suffix in this directory will be
processed.Other provided configuration files are listed below.
/etc/httpd/conf.modules.d/00-base.confThe set of core modules included with
httpd which are all loaded by
default./etc/httpd/conf.modules.d/00-optional.confThe set of non-core modules included with
httpd which are not
loaded by default./etc/httpd/conf.modules.d/00-systemd.confThis file loads
which is necessary for the correct operation of the
httpd.service systemd unit, and should
not be removed or disabled.Other configuration filesDefault module configuration files and site-specific
configuration files are loaded from the
/etc/httpd/conf.d/ directory. Only files
with a suffix will be loaded. The
following files are provided:
/etc/httpd/conf.d/userdir.confThis file gives an example configuration for
to map URLs such as
to
/home/jim/public_html/. Userdir mapping
is disabled by default./etc/httpd/conf.d/autoindex.confThis file provides the default configuration
for which generates HTML
directory listings when enabled. It also makes file icon
image files available at the
URL-path./etc/httpd/conf.d/welcome.confThis file enables a "welcome page" at
if no content is present
in the default documentation root
/var/www/html./etc/httpd/conf.d/ssl.conf (present only if is installed)This file configures a TLS
listening on port
. If the default configuration is used,
the referenced test certificate and private key are
generated the first time httpd.service is
started; see
httpd-init.service8
for more information.Instantiated servicesAs an alternative to (or in addition to) the
httpd.service unit, the instantiated template
service httpd@.service unit file can be used,
which starts httpd using a different
configuration file to the default. For example,
systemctl start httpd@foobar.service will
start httpd using the configuration file
/etc/httpd/conf/foobar.conf. See httpd@.service8 for more information.Files/etc/httpd/conf/httpd.conf,
/etc/httpd/conf.d,
/etc/httpd/conf.modules.dSee alsohttpd8,
httpd.service8,
,