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

Chapter 9 173
Apache for MPE/iX
Major Components
Error Logging
Apache error logging is useful when trying to start Apache as well as
for monitoring a running web server. Apache will log errors into a log
file called error_log by default. This log file resides in the
/APACHE/PUB/logs directory.
The number of messages logged in the error log is set by the LogLevel
directive in the httpd.conf file. Possible values for LogLevel (by
increasing significance) are debug, info, notice, warn, error, crit, alert,
emerg. When a particular level is specified, messages from all other
levels of higher significance are reported as well. For example, when
LogLevel is “info”, then messages with log levels of notice, warn and
up to emerg are also posted.
By default, the level is set to warn. Using a level of at least crit is
recommended.
Managing Log Files
Apache log files can grow quite large, especially for high traffic sites. It’s
best to monitor the size of the log files and periodically purge or archive
them. Purge or rename log files only while Apache is stopped or after
restarting Apache. This is necessary because Apache continues to write
to these files while it is running:
:HELLO MGR.APACHE,PUB
:XEQ SH.HPBIN.SYS -L
shell/iX> cd logs
shell/iX> mv access_log access_log.old (Apache is writing to access_log.old)
shell/iX> mv error_log error_log.old (Apache is writing to error_log.old)
shell/iX> kill -HUP ‘cat httpd.pid‘
After executing the kill -HUP, Apache is no longer writing to the *.old
files. Apache is now writing to a new error_log and a new access_log
and the *.old files can be purged or archived.
Adding Documents
There are several ways to add content to the Apache web server:
Add files or directories beneath the DocumentRoot,
/APACHE/PUB/htdocs.
Use the Alias directive in httpd.conf to name a different
document location outside of the DocumentRoot.
Use symbolic links from the files and directories beneath the
DocumentRoot to point outside the DocumentRoot. This
requires Options FollowSymLinks be set in httpd.conf.
Create a user directory reference. For USER.ACCOUNT, create
directory /ACCOUNT/GROUP/public_html where GROUP is the