If you would like to be notified when new versions of Apache are released
consider joining the
announcements list.

Apache Configuration Files

Directives

The distributed configuration files (httpd.conf-dist and mime.types, both
located in the conf subdirectory) work on TPF with the following caveats:

Apache on TPF does not support listening on multiple ports.

Performance considerations may dictate lowering the default values for
TimeOut (5 minutes) and KeepAliveTimeout (15 seconds) in order to reduce the
number of active ECBs on your system.

The default value of MaxRequestsPerChild is zero (infinity). A non-zero
value is recommended on TPF to control resource utilization (such as heap
storage) by the long running Apache child ECBs.

Depending on your typical response size, the SendBufferSize directive
can be useful for setting SO_SNDBUF higher than the 32KB default buffer size
for Native Stack.

Restart

Unlike on Unix systems, newly created Apache child processes on TPF re-read
the various configuration files (such as httpd.conf and mime.types).
Therefore when you change the configuration file(s) you should manually restart
the server to keep the Apache parent process and all child processes in sync.
There are several ways to restart Apache on TPF:

zinet stop/start

zinet stop s-apache followed by a zinet start s-apache

The Apache parent tells its children to immediately exit, even if they're
processing a request. Once the children exit, the parent exits.

The Apache parent tells its children to immediately exit, even if they're
processing a request. Once the children exit, the parent exits. For the
DAEMON model, InetD (ZINET) will create a new Apache parent to replace the
one that exited.

The Apache parent tells its children to immediately exit, even if they're
processing a request. Then the existing parent re-reads the configuration
file(s) and creates new children to replace the exiting ones.

The Apache parent asks its children to exit when they're finished with
any requests they're currently handling. Then the existing parent re-reads
the configuration file(s) and creates new children to replace the exiting
ones.

"Graceful restart" can be used to pick up new configuration files without
disrupting traffic.

Request the CGI script from a browser:

Overview of Apache's "dash" options:

Apache can be invoked with various options, such as "-f". Some of these
options display information about the server or perform syntax checks but they
don't actually start the server. These "information only" options are useful
with TPF's ZFILE command line feature: -h, -l, -L, -S, -t, -T, -v, and -V.

Another option, -X, is used when actually running the server. It is passed
to Apache through the ZINET XPARM field since ZINET is the only way to start
the server on TPF.

A third group of options apply to both the informational displays (ZFILE)
and running the server (ZINET XPARM): -d, -D and -f.

The rest of Apache's options are either not applicable or are not supported
on TPF.

On TPF4.1 using dash options requires PJ27277 which shipped on PUT13.

Table of supported Apache options

Option

ZFILE

ZINET

Description

-dpath

ZFILE

ZINET

Set the initial value for the
ServerRoot directive.

-Ddefine

ZFILE

ZINET

Set a configuration parameter which can be used with
<IfDefine>...</IfDefine> sections in the configuration file to
conditionally skip or process commands.

-ffilename

ZFILE

ZINET

Use an alternate configuration file instead of the default
conf/httpd.conf file.

-h

ZFILE

List a short summary of available command line options then
exit. Note that this outputs all options, not just those supported on TPF.

-l

ZFILE

List modules compiled into the server then exit.

-L

ZFILE

List available configuration directives then exit. Note
that this outputs all configuration directives, not just those supported on
TPF.

-S

ZFILE

Show the settings as parsed from the configuration file
then exit. Currently Apache only shows the virtual host settings.

-t

ZFILE

Run syntax tests for configuration files with document root
checks then exit.

-T

ZFILE

Run syntax tests for configuration
files without document root checks then
exit.

-v

ZFILE

Show the version number then exit.

-V

ZFILE

Show the version number and various compile settings then
exit.

-X

ZINET

Run in single-process mode for internal debugging purposes
only. The parent process does not tpf_fork any children.

(See "ZINET ADD-Add an Internet Server Application Entry" and "ZINET
ALTER-Change an Internet Server Application Entry" in the
IBM TPF Information Center
for more information about using the XPARM field.)

Syslog Daemon

Syslog overview:

The syslog daemon is a server process that provides a message logging
facility for application and system processes. It can be used to write
messages to log files or to tapes. See "Operating the Syslog Daemon" in the
IBM TPF Information Center.
And see the Apache ErrorLog
directive documentation
for details on how to use syslog with Apache.

On TPF4.1 syslog capabilities were added with PJ27214 which shipped with
PUT13. You must follow the
TPF4.1 syslog-specific installation instructions
in order to have the option of using syslog with Apache on a TPF4.1 system.
No additional installation steps are needed for z/TPF1.1 systems.

Tips on using syslog with your Apache error log:

This section provides some tips on using syslog with Apache.
It is not meant to replace the syslog documentation in the TPF TCP/IP publication.

The syslog daemon will not create files. If you are logging to a file
(as specified in the syslog.conf configuration file) that file must
already exist and have permissions that allow the syslog daemon to write to
it.

You must restart the syslog daemon for it to recognize changes to its
syslog.conf configuration file.

The syslog daemon must be active prior to starting Apache.

To indicate you want to use syslog with your Apache error log add the
following directive to your httpd.conf file:
"ErrorLog syslog:facility" where facility is
"local0" through "local7".

Apache will default the facility to "local7" if you omit the facility
name from the ErrorLog directive (that is "ErrorLog syslog").

The syslog facility name must be one that is recognized by both Apache
and the syslog.h header file. The facility names "local0" through "local7"
are explicitly set aside for your use.

You won't see the normal Apache startup/shutdown messages when you
use syslog with your Apache error log.

Syslog does not support TCP/IP Offload devices (ZCLAW;
used only on TPF4.1)

Porting Notes

Changes made due to differences between UNIX and TPF's process models:

Signals: On TPF a signal sent to a process remains
unhandled until the process explicitly requests that signals be
handled using the tpf_process_signals() function.
Additionally, the default action for an alarm on TPF4.1 without
PJ30263 applied is to take an OPR-7777 dump and exit.
On UNIX, z/TPF, and TPF4.1 with PJ30263 applied the default is the
equivalent of exit() with no dump taken.

Find that function... Some simple functions &
definitions needed to be added on TPF. They are in src/os/tpf/os.h.

EBCDIC changes: TPF-specific conversion tables between
US-ASCII and EBCDIC (character set IBM-1047 to be exact) were created.

Miscellaneous, minor changes: Various minor changes
(such as casting) were made due to differences in how some functions
are implemented on TPF.