Sometimes you may need to find the location of configuration file of Apache. It differs based on your operating system and type of installation. In this article, we will list all the different locations for Apache config file. Unless you have .htaccess file configured for your Apache server, it is important to know the location of Apache file configuration in order to be able to make changes to Apache settings.
Apache Config File Location in Linux
All configuration files for Apache are located at any of the following locations, depending on your system and installation:
- /etc/apache2/httpd.conf
- /etc/apache2/apache2.conf
- /etc/httpd/httpd.conf
- /etc/httpd/conf/httpd.conf
Also read : Redirect HTTP to HTTPS in Apache
Apache Config File Location in Windows
In windows, the configuration file for Apache is located at
C:\Program Files\Apache Software Foundation\ApacheX.X\conf\
where X.X stands for the version number of your Apache software.
Once you know the location of your Apache config file, you can easily modify it to setup your server.
Also read : Configure SSL/TLS passthrough in NGINX
Related posts:
How to Prevent Direct File Download in Apache Server
How to Change Apache Prefork to Worker in Ubuntu
How to Change Apache Config Without Restarting
Apache Commands Cheat Sheet
Shell Script to Clear/Delete Log Files
How to Force Download in Apache
How to Remove URL Parameters using .htaccess
How to Disable Directory Browsing in Apache

Sreeram has more than 10 years of experience in web development, Python, Linux, SQL and database programming.