Location of httpd.conf file

7,587

Solution 1

For Linux, it is in either /etc/apache2/ or /etc/local/apache2/.

For Windows, it is in C:\Program Files\Apache Software Foundation\Apache?.?\conf\ where ?.? is the version number.

Solution 2

There is no 'proper' location for any config file on a unix system. It can be anywhere the system admin wants to put it.

There are conventions - like putting the base config file in /etc/ - but they are just that: conventions. It may make sense in some web hosting environments to cather all the config files in each user's folder, or one common folder for the cpanel system.

Fastest way to find out is contact your provider's support desk - it is a common question, they will know.

Share:
7,587

Related videos on Youtube

Avinash Babu
Author by

Avinash Babu

Updated on September 18, 2022

Comments

  • Avinash Babu
    Avinash Babu over 1 year

    I have setup a home server on my PC and I can edit my httpd.conf file on it.

    When I move to my web server I can't see the location of my httpd.conf file. Is it in the www directory of the website?

    I have checked everywhere on the Internet and I didn't find a good answer for the location of the httpd.conf file. Hope you guys can help me solve this problem.

  • Avinash Babu
    Avinash Babu almost 10 years
    i just need to know the location of httpd.conf file in my website cpanel ..not in my homeserver
  • closetnoc
    closetnoc almost 10 years
    cPanel? I have no clue. But here is the documentation: docs.cpanel.net/twiki/bin/view/AllDocumentation/WebHome
  • Avinash Babu
    Avinash Babu almost 10 years
    i mean the location of httpd.conf file on my webserver ..can it be found on the www directory of the web server
  • Avinash Babu
    Avinash Babu almost 10 years
    am not telling about just a cpanel case ..i just need to know the location of that file ..
  • Avinash Babu
    Avinash Babu almost 10 years
    well is it on the sites-avail directory ??..when i check my public-html folder i havnt find httpd.conf ..
  • closetnoc
    closetnoc almost 10 years
    No. The httpd.conf file configures Apache. The various files under the /sites-available directory configure the specific sites. Your public-html is the web space where your web site content is to reside. Your httpd.conf file is in the directories that I specified before. You can get to them via logging into your system using SSH/Bash and using cd to traverse the file system directories. The Apache documentation is here: httpd.apache.org/docs
  • closetnoc
    closetnoc almost 10 years
    Once you log on using SSH, you can enter cd /etc/apache2/ then ls. You will find the httpd.conf file. Sometimes it is installed in /etc/local/apache2/ so you may need to modify the cd above.
  • Avinash Babu
    Avinash Babu almost 10 years
    Thanks for explaining me ..:) ..i will try ssh for finding that on my web server ..:)
  • closetnoc
    closetnoc almost 10 years
    Good luck. Apache can be a bit hard to understand at first, but it is the most flexible and secure web server and in the end, the easiest to understand and configure.
  • Avinash Babu
    Avinash Babu almost 10 years
    yes it is .....:) ..