HTTPD.CONF(5)

πŸ’– HTTPD.CONF πŸ’–

okay bestie, welcome to section 5 of the manual β€” this is the one about httpd.conf, aka the configuration files for httpd. grab a snack, we're going in πŸ“


✨ NAME ✨

httpd.conf β€” the configuration files for httpd, periodt πŸ’…


🌸 SYNOPSIS 🌸

/etc/httpd/conf/httpd.conf, /etc/httpd/conf.modules.d, /etc/httpd/conf.d

three lil places where the magic lives. that's it, that's the vibe πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

The main configuration file for the httpd daemon is /etc/httpd/conf/httpd.conf. The syntax of this file is described at https://httpd.apache.org/docs/2.4/configuring.html, and the full set of available directives is listed at https://httpd.apache.org/docs/2.4/mod/directives.html. like, bookmark those, fr fr πŸ”–

🌈 Configuration structure

The 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 mod_ssl.so) place files in the conf.modules.d directory with the appropriate LoadModule directive so that module is loaded by default. so like, the modules just kinda show up pre-loaded, iconic of them ✨

Some notable configured defaults are:

  • DocumentRoot /var/www/html β€” the default document root from which content is served. this is where your little website lives 🏠
  • Listen 80 β€” the daemon listens on TCP port 80. the classic port, no cap πŸ‘‘
  • ErrorLog "logs/error_log" β€” error messages are logged to /var/log/httpd/error_log. so when stuff breaks you know where to cry about it 😭
  • ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" β€” CGI scripts are served via the URL-path /cgi-bin/. old school but it slays 🧚
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. bestie do NOT rm these files, i am begging you πŸ™ˆ

πŸ’œ MPM configuration

The 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 LoadModule directive must be uncommented in this file; by default the event MPM is enabled. For more information on MPMs, see https://httpd.apache.org/docs/2.4/mpm.html. one and only one, like a monogamous LoadModule situation πŸ’€

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_shutdown

yes it's a whole thing. run the command. it's giving "trust the process" 🌸

πŸ¦‹ Module configuration files

Module configuration files are provided in the /etc/httpd/conf.modules.d/ directory. Filenames in this directory are by convention prefixed with a 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 0x- prefix to ensure these load first. Only filenames with a .conf suffix in this directory will be processed. so like, name it right or it doesn't count, the filesystem is strict like that πŸ’…

Other provided configuration files are listed below.

  • /etc/httpd/conf.modules.d/00-base.conf β€” the set of core modules included with httpd which are all loaded by default. the main character modules πŸ‘‘
  • /etc/httpd/conf.modules.d/00-optional.conf β€” the set of non-core modules included with httpd which are not loaded by default. the bench warmers πŸͺ‘
  • /etc/httpd/conf.modules.d/00-systemd.conf β€” this file loads mod_systemd which is necessary for the correct operation of the httpd.service systemd unit, and should not be removed or disabled. hands off this one, i mean it πŸ”₯

⭐ Other configuration files

Default module configuration files and site-specific configuration files are loaded from the /etc/httpd/conf.d/ directory. Only files with a .conf suffix will be loaded. The following files are provided:

  • /etc/httpd/conf.d/userdir.conf β€” this file gives an example configuration for mod_userdir to map URLs such as http://localhost/~jim/ to /home/jim/public_html/. Userdir mapping is disabled by default. jim's got a homepage waiting to happen 🏑
  • /etc/httpd/conf.d/autoindex.conf β€” this file provides the default configuration for mod_autoindex which generates HTML directory listings when enabled. It also makes file icon image files available at the /icons/ URL-path. cute lil folder views πŸ“
  • /etc/httpd/conf.d/welcome.conf β€” this file enables a "welcome page" at http://localhost/ if no content is present in the default documentation root /var/www/html. a lil hello when you got nothing else 🫢
  • /etc/httpd/conf.d/ssl.conf (present only if mod_ssl is installed) β€” this file configures a TLS VirtualHost listening on port 443. 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.service(8) for more information. TLS time, secure queen πŸ”’

🧚 Instantiated services

As 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@.service(8) for more information. multiple httpds, multiple vibes, we love options πŸ’–


🌟 FILES 🌟

/etc/httpd/conf/httpd.conf, /etc/httpd/conf.d, /etc/httpd/conf.modules.d

πŸ› REPORTING BUGS πŸ›

Please report bugs by filing an issue in https://bugzilla.redhat.com/. found a bug? tell on it, respectfully πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

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


πŸ‘‘ AUTHOR πŸ‘‘

Joe Orton <jorton@redhat.com>

  • Author

and that's the whole page bestie, you ate that πŸ’…βœ¨ this was httpd version, from the HTTPD.CONF(5) page, dated 10/01/2026 β€” go forth and configure responsibly, mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from