Where to find HTTPD Config Files?

So you’ve built a traditional web server on a red hat distribution of linux, and need to tweak the configuration some more? Finding the configuration file for this service has always been the bane of my life.

To find out you can actually query the service itself by getting it to show you the compile settings. The command to do this is:

httpd -V

The output of this should look something like the following:

Server version: Apache/2.4.6 (CentOS)
Server built: Jun 27 2018 13:48:59
Server's Module Magic Number: 20120211:24
Server loaded: APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with….
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

As you can see from the above, the HTTPD root and server config file sections show exactly where it is. By default it is found at /etc/httpd/conf/httpd.conf.

Leave a Reply

Your email address will not be published. Required fields are marked *

*