From: Rich Bowen Date: Thu, 25 Mar 2010 13:20:39 +0000 (+0000) Subject: Bring this doc a little further into this century. Considering dropping, X-Git-Tag: 2.3.6~285 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7df044a763aeb4f20fc7c1a4d16e75333242275d;p=thirdparty%2Fapache%2Fhttpd.git Bring this doc a little further into this century. Considering dropping, or at least rewriting, most of the "Background" section. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@927382 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/dso.xml b/docs/manual/dso.xml index 32ae496437f..0c7ea47a524 100644 --- a/docs/manual/dso.xml +++ b/docs/manual/dso.xml @@ -59,7 +59,7 @@ itself. Practically all other distributed Apache httpd modules can then be placed into a DSO by individually enabling the DSO build for them via 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

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 @@ -90,38 +90,41 @@

  1. - Build and install a distributed Apache httpd module, say +

    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
  2. - Build and install a third-party Apache httpd module, say - 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
  3. - Configure Apache HTTP Server for later installation of shared - modules: +

    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.

  4. @@ -132,8 +135,7 @@ $ make install $ cd /path/to/3rdparty
    -$ apxs -c mod_foo.c
    -$ apxs -i -a -n foo mod_foo.la +$ apxs -cia mod_foo.c
@@ -142,6 +144,8 @@ $ apxs -i -a -n foo mod_foo.la use a LoadModule directive in httpd.conf to tell Apache httpd to activate the module.

+ +

See the apxs documentation for more details.

Background @@ -234,16 +238,6 @@ $ apxs -i -a -n foo mod_foo.la provides. On the other hand using shared objects for extending a program is not used by a lot of programs.

-

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.

Advantages and Disadvantages @@ -266,7 +260,7 @@ $ apxs -i -a -n foo mod_foo.la third-party modules even after installation. This is at least a great benefit for vendor package maintainers who can create a Apache httpd core package and additional packages containing - extensions like PHP3, mod_perl, mod_fastcgi, + extensions like PHP, mod_perl, mod_security, etc.
  • Easier Apache httpd module prototyping because with the