0

I have spent my whole day finding the location of the httpd.conf file for my website. I contacted my host and they told me they didn't give us permission to modify the httpd.conf file.

Some webservers gives the permission to edit and find the httpd.conf file on their servers via ssh.

My question is that does every webserver have an httpd.conf file in their directory?

1
  • Please take a few minutes to review the Help Center's section on Asking questions, and refrain from asking overly generalized questions (i.e., questions here should be specific and related to your website).
    – dan
    May 2, 2014 at 19:24

2 Answers 2

2

Not all servers use httpd.conf, but all have some type of configuration file. If you're using apache, the httpd.conf configurations can be overriden through .htaccess file in the root web directory unless overrides are turned off in httpd.conf

See: http://httpd.apache.org/docs/2.2/howto/htaccess.html

5
  • so every server has its own configuration files right ??? it can be httpd.conf or some other files right z?? May 2, 2014 at 17:29
  • 1
    Yes, all mainstream web servers will have some type of configuration file. The configuration controls the entire server, so in the case like yours it's probably a shared host so you'll have to use overrides through .htaccess . They can't allow you to change the main config file because it would impact the entire server.
    – JMC
    May 2, 2014 at 17:30
  • If its a vps host will i will be able to find my httpd.conf file ? May 2, 2014 at 17:37
  • If you can access the directory "/etc" on the server then you can probably access it the conf file. If your access is limited to the web directory then no.
    – JMC
    May 2, 2014 at 17:41
  • No problem, you can put this in a php file to find out your current path on the server: echo realpath(dirname(FILE)); Then run the php file.
    – JMC
    May 2, 2014 at 17:49
1

httpd.conf is available only if you have Apache as the web server. Nginx and LiteSpeed have their own configuration files and names.

On cPanel servers it is under the /usr directory, whereas on plain servers with Linux distros, it is under the /etc directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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