You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by ra...@madhaus.utcs.utoronto.ca on 1996/05/01 01:55:24 UTC

Module Information Module

I have written a little module in the same style as mod_status which
gives you an idea of which modules are currently linked into the running
httpd.  It wasn't possible to do it without a slight addition to the
Apache 1.1 distribution code.  The patch is quite simple though, I and
hope it will be considered.  I think it is a useful module.  I have
uploaded it to ftp.hyperreal.com:/httpd/incoming/mod_info.tar

You can see it in action by pointing your browser to:

    http://rathaus.utcs.utoronto.ca/info

You can feed it an individual module name with something like:

    http://rathaus.utcs.utoronto.ca/info?dir_module

The patch needed is to the Configure file.  It's in the mod_info.tar
file, but I'll list it here for you guys to pick apart:

*** Configure   Sat Mar 16 16:58:01 1996
--- Configure.new       Tue Apr 30 19:39:07 1996
***************
*** 57,62 ****
--- 57,68 ----
           } \
         print "  NULL"; \
           print "};"; \
+          print "char *module_names[] = {"; \
+          for (i = n-1; i > -1; --i) { \
+              printf "  \"%s\",\n", modules[i]; \
+          } \
+        print "  NULL"; \
+          print "};"; \
     }'
  
  awk >Makefile <$tmpfile '\

It is simply to get a list of names of the modules.  I looked at various
other ways from changing the module structure, to trying to induce things
from the symbol table, but all in all I think this is the least intrusive
method, and it requires no change to the module API.

-Rasmus