httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] apache checking
Date Thu, 09 Oct 2003 08:01:26 GMT
>-----Original Message-----
>From: Aldian Fazrihady []
>i'm creating a linux-application installer which had
>to add configuration data to httpd.conf.
>I want to know how to find the right httpd.conf of the
>running apache in a customized environment. i.e., the
>user recompile the apache and place the httpd.conf in
>a location he/she like. Can I query the apache web
>server to output the path of httpd.conf? 

Do you mean from the client? Then no. If you could do this, it would be
a big security hole! Apache does not reveal any details of the
underlying filesystem to the client.

However, if you have access to the server, there are a couple of ways
you can see this:

- "ps -ef" will show the command that started apache. If you started
apache with a "-f" to specify the path to httpd.conf, then you might see
it here, e.g. "/usr/sbin/httpd -f /etc/httpd.conf"

- Use "ps" to identify the apache binary (e.g. /usr/sbin/httpd), then
execute it with "-V". This will output a number of statics which were
compiled into the binary. The path to the default config is found from
the concatenation of HTTPD_ROOT and SERVER_CONFIG_FILE. 

Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

>Another case is if in a system contains two or more
>httpd.conf. One is in /etc/httpd.conf, another is in
>/usr/local/apache/conf, etc. How do I programmatically
>find the one which is used by the running apache?
>It will be great if I can reconfigure the apache
>without knowing the location of httpd.conf. Moreover,
>without the need of restarting the apache. :)
>Thanks in advance. Any reply is appreciated.
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Swiss Exchange.
This e-mail is of a private and personal nature. It is not related to
the exchange or business activities of the SWX Swiss Exchange. Le
présent e-mail est un message privé et personnel, sans rapport avec
l'activité boursière de la SWX Swiss Exchange.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message