Wednesday, October 30, 2013
Finding Apache configuration file (httpd.conf)
Finding Apache configuration file (httpd.conf)
Just a quick tip for programmers working with Apache. Sometimes I'm asked where to find the Apache configuration file on a given server. Since it's possible to configure this there is no "default location" so I usually do:
$ ps -ef | grep apache
which gives me a list like
deploy@cmd01:/$ ps -ef | grep apache
root 4053 1 0 06:26 ? 00:00:04 /usr/sbin/apache2 -k start
www 5189 4053 0 11:00 ? 00:00:00 /usr/sbin/apache2 -k start
www 5199 4053 0 11:00 ? 00:00:00 /usr/sbin/apache2 -k start
...
Then simply run
$ /usr/sbin/apache2 -V
and you will get the details you need, specifically this
Server compiled with....
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment