Build dynamic modules on HP-UX

Four files are required to build any module. These are contained in the directory /opt/HTTPServer/example_module.

  1. Install the server.
  2. Copy the entire example_module directory to the directory where you will do your build (the "build directory").
  3. Switch to the build directory.
  4. Copy your module.c file to the build directory
  5. .
  6. Rename Makefile.exmpl to Makefile
  7. Edit Makefile and make the following changes:
  8. Issue the make command.
  9. Copy the resulting .so file to /opt/HTTPServer/libexec.
  10. Add LoadModule and AddModule directives to httpd.conf, as well as any module specific directives.
  11. Restart the server.

For an example, switch to /opt/HTTPServer/example_module and run the make command. This commands acts on the mod_example.c sample file and results in creating a .so file for mod_example. To build your own module, use the sample file (mod_example.c) as a template.