1HTTPD.CONF(5)                     httpd.conf                     HTTPD.CONF(5)
2
3
4

NAME

6       httpd.conf - Configuration files for httpd
7

SYNOPSIS

9       /etc/httpd/conf/httpd.conf, /etc/httpd/conf.modules.d,
10       /etc/httpd/conf.d
11

DESCRIPTION

13       The main configuration file for the httpd daemon is
14       /etc/httpd/conf/httpd.conf. The syntax of this file is described at
15       https://httpd.apache.org/docs/2.4/configuring.html, and the full set of
16       available directives is listed at
17       https://httpd.apache.org/docs/2.4/mod/directives.html.
18
19   Configuration structure
20       The main configuration file (httpd.conf) sets up various defaults and
21       includes configuration files from two directories -
22       /etc/httpd/conf.modules.d and /etc/httpd/conf.d. Packages containing
23       loadable modules (like mod_ssl.so) place files in the conf.modules.d
24       directory with the appropriate LoadModule directive so that module is
25       loaded by default.
26
27       Some notable configured defaults are:
28
29       DocumentRoot /var/www/html
30           The default document root from which content is served.
31
32       Listen 80
33           The daemon listens on TCP port 80.
34
35       ErrorLog "logs/error_log"
36           Error messages are logged to /var/log/httpd/error_log.
37
38       ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
39           CGI scripts are served via the URL-path /cgi-bin/.
40
41       To remove any of the default configuration provided in separate files
42       covered below, replace that file with an empty file rather than
43       removing it from the filesystem, otherwise it may be restored to the
44       original when the package which provides it is upgraded.
45
46   MPM configuration
47       The configuration file at /etc/httpd/conf.modules.d/00-mpm.conf is used
48       to select the multi-processing module (MPM), which governs how httpd
49       divides work between processes and/or threads at run-time. Exactly one
50       LoadModule directive must be uncommented in this file; by default the
51       event MPM is enabled. For more information on MPMs, see
52       https://httpd.apache.org/docs/2.4/mpm.html.
53
54       If using the prefork MPM, the "httpd_graceful_shutdown" SELinux boolean
55       should also be enabled, since with this MPM, httpd needs to establish
56       TCP connections to local ports to successfully complete a graceful
57       restart or shutdown. This boolean can be enabled by running the
58       command: semanage boolean -m --on httpd_graceful_shutdown
59
60   Module configuration files
61       Module configuration files are provided in the
62       /etc/httpd/conf.modules.d/ directory. Filenames in this directory are
63       by convention prefixed with two digit numeric prefix to ensure they are
64       processed in the desired order. Core modules provided with the httpd
65       package are loaded by files with a 0x- prefix to ensure these load
66       first. Only filenames with a .conf suffix in this directory will be
67       processed.
68
69       Other provided configuration files are listed below.
70
71       /etc/httpd/conf.modules.d/00-base.conf
72           The set of core modules included with httpd which are all loaded by
73           default.
74
75       /etc/httpd/conf.modules.d/00-optional.conf
76           The set of non-core modules included with httpd which are not
77           loaded by default.
78
79       /etc/httpd/conf.modules.d/00-systemd.conf
80           This file loads mod_systemd which is necessary for the correct
81           operation of the httpd.service systemd unit, and should not be
82           removed or disabled.
83
84   Other configuration files
85       Default module configuration files and site-specific configuration
86       files are loaded from the /etc/httpd/conf.d/ directory. Only files with
87       a .conf suffix will be loaded. The following files are provided:
88
89       /etc/httpd/conf.d/userdir.conf
90           This file gives an example configuration for mod_userdir to map
91           URLs such as http://localhost/~jim/ to /home/jim/public_html/.
92           Userdir mapping is disabled by default.
93
94       /etc/httpd/conf.d/autoindex.conf
95           This file provides the default configuration for mod_autoindex
96           which generates HTML directory listings when enabled. It also makes
97           file icon image files available at the /icons/ URL-path.
98
99       /etc/httpd/conf.d/welcome.conf
100           This file enables a "welcome page" at http://localhost/ if no
101           content is present in the default documentation root /var/www/html.
102
103       /etc/httpd/conf.d/ssl.conf (present only if mod_ssl is installed)
104           This file configures a TLS VirtualHost listening on port 443. If
105           the default configuration is used, the referenced test certificate
106           and private key are generated the first time httpd.service is
107           started; see httpd-init.service(8) for more information.
108
109   Instantiated services
110       As an alternative to (or in addition to) the httpd.service unit, the
111       instantiated template service httpd@.service unit file can be used,
112       which starts httpd using a different configuration file to the default.
113       For example, systemctl start httpd@foobar.service will start httpd
114       using the configuration file /etc/httpd/conf/foobar.conf. See
115       httpd@.service(8) for more information.
116

FILES

118       /etc/httpd/conf/httpd.conf, /etc/httpd/conf.d,
119       /etc/httpd/conf.modules.d
120

SEE ALSO

122       httpd(8), httpd.service(8),
123       https://httpd.apache.org/docs/2.4/configuring.html,
124       https://httpd.apache.org/docs/2.4/mod/directives.html
125

AUTHOR

127       Joe Orton <jorton@redhat.com>
128           Author
129
130
131
132httpd                             10/20/2023                     HTTPD.CONF(5)
Impressum