We help IT Professionals succeed at work.

2 questions

fokchi
fokchi asked
on
hi,

I am a totally newbie in apache.  I have 2 question that i don't know how to get around in apache.

1. i have apache installed and configured in my linux box. However, I am not so sure if i got mod_userdir module in my apache. My 1st question is how to view all the modules that I have included in my running apache? which command i can call to see it.

2. if I didn't install this. do i need to re-compile my apache in order to have this module? If so, how do i do it? Any way to add module without re-compiling?

Thanks for any suggestion,

jo
Comment
Watch Question

Try to use Kpackage to check the modules installed, but it would require K Desktop Environment.
Commented:
fokchi,

1) To find out what modules have been loaded, you'll need to look in the httpd.conf file. A quick way would be to grep the file for the relevant instruction(s):

cat -n /usr/local/etc/apache/httpd.conf | grep LoadModule

and

cat -n /usr/local/etc/apache/httpd.conf | grep "AddModule mod_"

output from the above commands looks like this:

   207  LoadModule vhost_alias_module libexec/apache/mod_vhost_alias.so
   208  LoadModule mime_magic_module  libexec/apache/mod_mime_magic.so
...

and

   226  AddModule mod_vhost_alias.c
   227  AddModule mod_env.c
...

You can then open the httpd.conf file in your favourite editor and go to the line number indicated to examine / change the configuration.

2) If you didn't install it, then how you proceed next is entirely dependant on the way that Apache was packaged for installation on your machine. If the modules are not present, then you will need to re-compile, if they are contained in the package, but simply omitted from the configuration, you should be able to simply add them to httpd.conf, then restart Apache using the "apachectl restart" command.

Hope that helps!
svs
Commented:
To view a list of compiled-in modules, run "httpd -l".
Commented:

httpd -l will only display all the compiled-in modules.

Another way of displaying all the modules which is/are loaded during runtime:

edit your httpd.conf

------------------------------
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

#
# Allow server status reports, with the URL of http://servername/server-status
# Change the "tp.my.batgen.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
# Allow from a-list-of-allowed-hosts
</Location>

#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the "tp.my.batgen.com" to match your domain to enable.
#
<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
# Allow from a-list-of-allowed-hosts
</Location>

----
Now, restart your apache, and you can use your browser to view such info (http://your-server/server-info

good luck

Commented:
2nd part of your question:

I think mod_userdir will be compiled by default in apache (got to check this).  Anyway, check you httpd.conf, and look for directive:

AddModule .... blah blah...

some of it is commented out.  Try uncommenting those lines, and restart apache.  If it works, then it work, otherwise your need to get the module.  I would rather recompile apache from scratch.  There should be a way to (in fact it's one of the new feature) add module on-the-fly.  Honesy, I haven't try it out.

good luck

Commented:
fokchi,

any news on this?
CERTIFIED EXPERT

Commented:
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:

Split between malsoft, svs, and samri

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

periwinkle
EE Cleanup Volunteer

Explore More ContentExplore courses, solutions, and other research materials related to this topic.