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

172 Chapter9
Apache for MPE/iX
Major Components
Stopping Apache
Apache can be stopped by issuing an :ABORTJOB or kill. Kill can be
issued by users WWW.APACHE, MGR.APACHE, and MANAGER.SYS. Using
kill (which defaults to kill -TERM) is the preferred method for
stopping Apache since it uses Apache’s internal routines to clean up
open resources. Using :ABORTJOB will result in leaked SVIPC
semaphores. The CI command file IPCS.HPBIN.SYS can be used to
display SVIPC semaphores and the CI command file IPCRM.HPBIN.SYS
can be used to free leaked semaphores.
To stop Apache from the POSIX’s shell:
shell/iX>kill `cat /APACHE/PUB/logs/httpd.pid`
To stop Apache from the CI:
:HELLO MGR.APACHE
:XEQ SH.HPBIN.SYS "-c 'kill `cat /APACHE/PUB/logs/httpd.pid`'"
If kill cannot be used, Apache can be stopped with :ABORTJOB as a last
resort from either the CI or POSIX shell:
:ABORTJOB JHTTPD,WWW.APACHE
or
:XEQ SH.HPBIN.SYS -L
shell/iX>callci “abortjob jhttp,www.apache”
Restarting Apache
Apache can be restarted by issuing a kill -HUP. A restart will cause
Apache to reread its configuration files without having to stop and
restream the Apache job stream file. Restart is useful for making
configuration changes without disrupting web users. After a restart,
Apache continues running with the new configuration settings.
To restart Apache:
shell/iX>kill -HUP `cat /APACHE/PUB/logs/httpd.pid`
or
:XEQ SH.HPBIN.SYS "-c 'kill -HUP `cat /APACHE/PUB/logs/httpd.pid`'"
Stopping or restarting Apache using kill may cause the error_log to
contain numerous warning messages about the child processes not
exiting promptly.