Where can I find Apache Server Main Configuration and Virtual Host Configuration Files ?
I’ve already written about how to find Apache server’s main configuration (httpd.conf
or apache2.conf
) and virtual host configuration files by yourself in the following articles:
- Apache Web Server (HTTPD) Find Location Path to Main Server Configuration
- Find the Location of Apache Web Server Configuration Files in Unix Like Systems
But I thought maybe I should also put a quick reference to the paths directly for different unix-based or unix-like systems. The paths you see below should most likely be correct for new or default httpd
installations.
Operating System | Main Config Location | Virtual Hosts Location |
Ubuntu/Debian | /etc/apache2/apache2.conf | /etc/apache2/sites-available symlinked in /etc/apache2/sites-enabled |
CentOS and Fedora | /etc/httpd/conf/httpd.conf | /etc/httpd/conf.d |
FreeBSD | /usr/local/etc/apache24 | /usr/local/etc/apache24/Includes |
macOS | /private/etc/apache2/httpd.conf | /private/etc/apache2/other |