From d244537699258afca9cc39d539dca8455462f7f8 Mon Sep 17 00:00:00 2001
From: Rich Bowen configure
's
- --enable-module=shared
option as discussed
+ --enable-mods-shared
option as discussed
in the install documentation. After a
module is compiled into a DSO named mod_foo.so
you
can use mod_so
's LoadModule
command in your
@@ -65,7 +65,7 @@
or restart.
To simplify this creation of DSO files for Apache httpd modules
- (especially for third-party modules) a new support program
+ (especially for third-party modules) a support program
named apxs
(APache
eXtenSion) is available. It can be used to build DSO based
modules outside of the Apache httpd source tree. The idea is
@@ -87,38 +87,40 @@
Build and install a distributed Apache httpd module, say
mod_foo.c
, into its own DSO
- mod_foo.so
:
+ mod_foo.so
:
-$ ./configure --prefix=/path/to/install --enable-foo=shared
+$ ./configure --prefix=/path/to/install --enable-foo --enable-mods-shared=foo
$ make install
mod_foo.c
, into its own DSO
- mod_foo.so
:
+ Configure Apache HTTP Server for later installation of shared + modules:
-$ ./configure --add-module=module_type:/path/to/3rdparty/mod_foo.c \
-
- --enable-foo=shared
-
+$ ./configure --enable-so
$ make install
Configure Apache HTTP Server with all modules enabled, and loaded
+ as shared objects. You can then remove individual ones by
+ commenting out the LoadModule
directives in
+ httpd.conf
.
-$ ./configure --enable-so
+$ ./configure --enable-modules=most --enable-mods-shared=all
$ make install
The most
argument to
+ --enable-modules
indicates that all modules
+ which are not experimental or example modules will be built.
$ cd /path/to/3rdparty
-$ apxs -c mod_foo.c
-$ apxs -i -a -n foo mod_foo.la
+$ apxs -cia mod_foo.c
LoadModule
directive in httpd.conf
to tell Apache httpd to activate
the module.
+
+ See the apxs documentation for more details.
As of 1998 there were only a few software packages available - which use the DSO mechanism to extend their - functionality at run-time: Perl 5 (via its XS mechanism and the - DynaLoader module), Netscape Server, etc. Starting - with version 1.3, Apache HTTP Server joined the crew, because Apache httpd - already uses a module concept to extend its functionality and - internally uses a dispatch-list-based approach to link external - modules into the Apache httpd core functionality. So, Apache httpd is - really predestined for using DSO to load its modules at - run-time.