[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

any good way to get the apache DocumentRoot value?

Hello list,

This may be kind of off-topic here, but I wan to know is there any good
way to know the localhost apache DocumentRoot path?

My situation is, I have to distribute my cgi script(could be python or
perl)to some apache servers, having no idea where the DocumentRoot path
is, I have to parse a config file at $DocumentRoot/setup/config.ini

Is there any way for the script to know exactly where the correct
DocumentRoot is? It could have no idea about where httpd.conf is, either.

Any idea is highly welcome.
Patrick Hsieh <pahud@pahud.net>

Reply to: