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:
Limit Bandwidth & Connections in Apache
How to Block URL Pattern in Apache
How To Change Apache Log Location
How to Redirect in Apache Based on Hostname
How to Make Directory Inaccessible with .htaccess
How to Disable TLS 1.0 in Apache
How to Enable Apache MPM Prefork
How to Redirect POST Request Data in .htaccess

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