C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Adding Modules
 

10.7. Adding Modules

The Apache HTTP Server supports Dynamically Shared Objects (DSOs) or modules, which can easily be loaded at runtime as necessary.

The Apache Project provides complete DSO Documentation at online http://httpd.apache.org/docs-2.0/dso.html. Or if the http-manual

For the Apache HTTP Server to use a DSO, it must be specified in a LoadModule directive within in /etc/httpd/conf/httpd.conf/etc/httpd/conf.d/ directory. Refer to Section 10.5.15 LoadModule for more about the LoadModule directive.

If adding or deleting modules from http.conf, Apache HTTP Server must be reloaded or restarted, as covered in Section 10.4 Starting and Stopping httpd.

If creating a new module, first install the httpd-devel package as it contains the include files, the header files, as well as the APache eXtenSion (/usr/sbin/apxs) application, which uses the include files and the header files to compile DSOs.

After writing a module, use /usr/sbin/apxs/usr/sbin/apxs command, refer to the the Apache documentation online at http://httpd.apache.org/docs-2.0/dso.html and the apxs, man page.

Once compiled, put the module in the /usr/lib/httpd/ directory. Then add a LoadModule line to the httpd.conf, using the following structure:

LoadModule <module-name> <path/to/module.so>

In the above example, change <module-name> to the name of the module and <path/to/module.so> to the path to the DSO.

Главная