{"id":3400,"date":"2011-06-08T00:00:00","date_gmt":"2011-06-07T22:00:00","guid":{"rendered":"http:\/\/www.theill.com\/blog\/2011\/06\/08\/finding-apache-configuration-file-httpd-conf-location\/"},"modified":"2011-06-08T00:00:00","modified_gmt":"2011-06-07T22:00:00","slug":"finding-apache-configuration-file-httpd-conf-location","status":"publish","type":"post","link":"https:\/\/www.theill.com\/blog\/2011\/06\/08\/finding-apache-configuration-file-httpd-conf-location\/","title":{"rendered":"Finding Apache configuration file (httpd.conf) location"},"content":{"rendered":"
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:<\/p>\n
$ ps -ef | grep apache\n<\/code><\/pre>\nwhich gives me a list like<\/p>\n
deploy@cmd01:\/$ ps -ef | grep apache\nroot 4053 1 0 06:26 ? 00:00:04 \/usr\/sbin\/apache2 -k start\nwww 5189 4053 0 11:00 ? 00:00:00 \/usr\/sbin\/apache2 -k start\nwww 5199 4053 0 11:00 ? 00:00:00 \/usr\/sbin\/apache2 -k start\n...\n<\/code><\/pre>\nThen simply run<\/p>\n
$ \/usr\/sbin\/apache2 -V\n<\/code><\/pre>\nand you will get the details you need, specifically this<\/p>\n
Server compiled with....\n -D SERVER_CONFIG_FILE=\"\/etc\/apache2\/apache2.conf\"\n<\/code><\/pre>\nThat’s it. Are you using another\/faster approach? Let me know in the comments.<\/p>\n","protected":false},"excerpt":{"rendered":"
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 … Continue reading Finding Apache configuration file (httpd.conf) location<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"yoast_head":"\nFinding Apache configuration file (httpd.conf) location • Peter Theill Site<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n