Where Are Apache Config Files?
Apache httpd config roots on Debian/Ubuntu versus RHEL families, and which file to edit on each.
Last updated
Apache config lives in /etc/apache2 on Debian and Ubuntu, and /etc/httpd on RHEL, CentOS and Fedora. Same server, different filesystem traditions.
The layout differs too: Debian splits sites, mods and conf into available/enabled pairs, while RHEL keeps a flatter conf plus conf.d structure.
Where Apache stores this, by platform
/etc/apache2
Main config apache2.conf with sites-available, mods-available and conf-available splits. Enable sites with a2ensite. Verify with apachectl -S.
/etc/httpd
RHEL-family equivalent. Main config httpd.conf with conf.d drop-ins. Same apachectl tooling applies.
Frequently asked questions
How do I confirm which config Apache loads?
Debian-likes use /etc/apache2 with sites-available; RHEL-likes use /etc/httpd with conf.d. Run apachectl -S to print the live virtualhost resolution and config file in use.
Where do I add a new virtual host?
Debian-likes: edit sites-available files and enable with a2ensite. RHEL-likes: drop .conf files in conf.d. Both need a reload (apachectl graceful) to apply.
Notice an outdated path? Let us know.