Where are the configuration files for Apache saved?

By
Darío Rivera
Posted On
in
Apache
It may happen that sometimes we forget how we previously configured our Apache server and where we created additional configuration such as that related to virtual hosts.
To see the configuration files loaded in Apache we can use the following command.
apachectl -t -D DUMP_INCLUDES
We will get an output like the following:
Included configuration files:
(*) /usr/local/etc/httpd/httpd.conf
(512) /usr/local/etc/httpd/extra/httpd-vhosts.conf
(529) /usr/local/etc/httpd/extra/httpd-ssl.conf
Depending on how the configuration is structured, this output can be quite long in some cases.
Included configuration files:
(*) /etc/apache2/apache2.conf
(146) /etc/apache2/mods-enabled/access_compat.load
(146) /etc/apache2/mods-enabled/alias.load
(146) /etc/apache2/mods-enabled/auth_basic.load
...