Configuring and Managing MPE/iX Internet Services (July 2001)

Chapter 9 181
Apache for MPE/iX
Major Components
Here is a POSIX script that shows how libraries might be set up
programmatically. It uses hw.o as the archive library, hw.a:
shell/iX> cat xlbuild.sh
#!/bin/sh
#
# set the location of Apache
AP=/APACHE/PUB
#
# create the old libraries
rm -f ${AP}/XLC ${AP}/XLM ${AP}/XLHW
#
# copy the latest versions
cp /lib/libc.sl ${AP}/XLC
cp /lib/libm.sl ${AP}/XLM
#
#create a custom XL
callci "xeq linkedit.pub.sys 'buildxl xl=${AP}/XLHW'"
callci "xeq linkedit.pub.sys 'addxl
from=${AP}/hw/hw.a;to=${AP}/XLHW;share;merge'"
#
# remove fragmentation and minimize the internal tables
callci "xeq linkedit.pub.sys 'cleanxl ${AP}/XLHW;compact'"
#
# Relink Apache with the new NMXL list
callci "xeq linkedit.pub.sys 'altprog
${AP}/HTTPD;cap=ia,ba,ph,pm;xl=\"${AP}/XLHW,${AP}/XLM,${AP}/XLC\"'"
Configuring Apache Modules
Once a DSO has been compiled and linked, it needs to be configured.
DSOs can be configured manually or they can be configured with apxs.
Configuration consists of copying the DSO module to a known location
then updating httpd.conf to find and execute the DSO.
Manual Configuration
By convention, DSOs written in C reside in /APACHE/PUB/libexec.
After copying a DSO to this location, the AddModule and
LoadModule directives must be added to httpd.conf. An example of
where to place AddModule and LoadModule is shown in the
httpd.conf file for mod_example. Additional directives may be
necessary to configure a DSO’s handler, depending on what the DSO is
trying to accomplish.
:HELLO MGR.APACHE
:XEQ SH.HPBIN.SYS -L
shell/iX> cp hw/mod_hw.so libexec/mod_hw.so
shell/iX> vi conf/httpd.conf
...
# Note: The order is whch modules are loaded is important.
# Don’t change the order below without expert advice
#