Write and build dynamic modules on Windows
To write a module that will work with the server for Windows
NT, you must install the source code during the installation of
the server. This can be accomplished by selecting
"Custom" install and ensuring that "Apache
Source" is checked.
What source is included in the install
When you install the source, you will find a src
directory created in the server root directory. This directory
will contain the following directories:
- include - Most of the header files used
to create the IBM binary distribution of the webserver.
- os\win32 - Contains platform specific
includes for the Windows NT platform distribution of the
webserver.
- CoreR - Contains the ApacheCore.lib.
This is the library with which you must link to allow
your module to run with the binary distribution of the
IBM HTTP Server.
- modules\example - Contains an example
module and project file which demonstrates how to build a
module. The project file (.dsp) was created with
Microsoft Visual C++ 6.0 (c).
Additionally, you will find a apachesrc
directory in the server root. This directory contains a .zip file
of the original Apache source code upon which the IBM HTTP Server
is based. Be aware that you cannot build the binaries that are
distributed from IBM with this source code. Due to legal
restrictions on some of the technology included in the IBM
binaries, source code cannot be supplied.
How to build a module
To successfully build a module to run with IBM HTTP Server, you must do the following:
- Add the src\include directory to your
list of include paths.
- Link with the ApacheCore.lib file found in the src\CoreR
directory.
Please note the following restrictions when building a module
to run with IBM HTTP Server:
- You must link against the ApacheCore.lib binary
that is installed by the server installation program in
the src\CoreR directory.
- You must use the header files supplied by the server
installation program in the src\include
and os\win32 directories.
- You cannot modify or add fields to the header files in
the src\include or os\win32 directories.