Thursday, August 14, 2014

Quickest Way To Find Apache Configuration File Location

If you work on different environments all the time you will know the pain, especially if the servers are set up on ad hoc basis. The easiest way to find Apache root location is to use httpd command. Just run the below command in terminal:
httpd -V

Now you will get a whole bunch of information about your Apache server installation. You will find something like this:
-D HTTPD_ROOT="/etc/httpd"

This is Apache root location. You will also get your configuration file (httpd.conf) location there. Just look for:
-D SERVER_CONFIG_FILE="conf/httpd.conf"

This location is relative to the HTTPD_ROOT location. So if you are unable to get hold of the guy who set up the system, hope this will help you save some trouble.


No comments:

Post a Comment