Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
1  
Just to clarify, in light of the discussion below, do you have your own "web server"? You won't have access to httpd.conf on a shared server for instance. –  w3d May 2 at 13:17

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
i just need to know the location of httpd.conf file in my website cpanel ..not in my homeserver –  Avinash Babu May 2 at 3:45
    
cPanel? I have no clue. But here is the documentation: docs.cpanel.net/twiki/bin/view/AllDocumentation/WebHome –  closetnoc May 2 at 3:47
    
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 May 2 at 3:49
    
No. That would be a huge security hole. I do not know cPanel since I do not use it. Otherwise using the file system paths I listed above, you will fine the httpd.conf file and the various virtual site files in /sites-available directory. –  closetnoc May 2 at 3:52
    
am not telling about just a cpanel case ..i just need to know the location of that file .. –  Avinash Babu May 2 at 3:56

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|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.