I think all these answers aren't really answering the question. The root level can be determined by running the command
httpd -V. This will show you what options the Apache daemon was built with at compile time. This is what controls where
httpd determines where to look for it's config. files and .so modules by default.
% httpd -V
Server version: Apache/2.2.17 (Unix)
Server built: Dec 17 2010 11:58:24
Server's Module Magic Number: 20051115:25
Server loaded: APR 1.3.12, APR-Util 1.3.9
Compiled using: APR 1.3.12, APR-Util 1.3.9
Server MPM: Prefork
forked: yes (variable process count)
Server compiled with....
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
The key line in that output is the
HTTPD_ROOT. That defines where Apache's
ROOT directory is to start,
/etc/httpd in my case, when looking for config. files and modules.
ROOT is not the same thing as
ROOT is specific to how the
httpd daemon was compiled, the
DocumentRoot is for specifying where the
httpd daemon should start looking for actual web content (.html files and such).
httpd.conf file I have the following Load lines:
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
Given this the full path to your modules would be, for example:
This is from a CentOS 5.x system but the technique is still apt.
BTW, it can get a little confusing because in CentOS' case the files are organized physically here:
% ls /usr/lib/httpd/modules/
libphp5.so mod_authnz_ldap.so mod_dav_fs.so mod_headers.so mod_perl.so mod_speling.so
...and then accessible to the Apache daemon,
httpd, through this path:
% ls -l /etc/httpd/
drwxr-xr-x 2 root root 4096 Apr 26 2011 conf
drwxr-xr-x 3 root root 4096 Apr 26 2011 conf.d
-rw-r--r-- 1 root root 18 Feb 24 2009 htpasswd
lrwxrwxrwx 1 root root 19 Apr 26 2011 logs -> ../../var/log/httpd
lrwxrwxrwx 1 root root 27 Apr 26 2011 modules -> ../../usr/lib/httpd/modules
lrwxrwxrwx 1 root root 13 Apr 26 2011 run -> ../../var/run
modules link connects