Configuring and Managing MPE/iX Internet Services (July 2001)
188 Chapter9
Apache for MPE/iX
Sample Module Code (mod_hw)
# simple test
test: reload
lynx -mime_header http://localhost/hw
# install and activate shared object by reloading Apache to
# force a reload of the shared object file
reload: install restart
# the general Apache start/restart/stop
# procedures
start:
$(APACHECTL) start
restart:
$(APACHECTL) restart
stop:
$(APACHECTL) stop
Extended Apache Programming Interface (EAPI)
Apache 1.3.9 and later are built with an extended set of Apache APIs.
This means that Apache 1.3.9 and later expects these EAPIs to be built
into any DSO they call. This EAPI feature is included in Apache so that
a DSO can be used by either Apache or WebWise, since WebWise
requires EAPI for its SSL functionality.
When creating DSOs, you must compile with the -DEAPI option. This
will include the necessary EAPI header files. These header files are
distributed with Apache 1.3.9 and later and reside in the
/APACHE/PUB/include directory. This include directory also contains
the README.EAPI file. The README.EAPI file describes additional
functionality that is available with EAPI such as more features in the
mod_rewrite, mod_status, and mod_proxy modules. DSOs created
with apxs will automatically include the -DEAPI option.
DSOs created without -DEAPI may operate successfully but may
generate a warning message in the error_log file.
Troubleshooting
For any kind of trouble with Apache, first look in the error log. Execute
a tail command on the error_log to look at the last few entries. The
last entry will be the most recent entry:
shell/iX> tail /APACHE/PUB/logs/error_log
For troubleshooting Apache at the source code level, the Apache
program file can be run with the MPE/iX debugger. It is best to run it
with the -X (capital “X”) option to prevent the parent Apache process
from creating child processes:
:run httpd.pub.apache;info=“-X”;debug