# Overview of the Apache TPF Port

[ Configuration Files | What's Available | Porting Notes ]

This version of Apache includes changes allowing it to run on IBM's EBCDIC-based TPF (Transaction Processing Facility) operating system. Unless otherwise noted TPF version 4.1 PUT08 and APAR PJ25589 are required.
Refer to htdocs/manual/install-tpf.html for step-by-step installation instructions.
As this is the first cut at making Apache run on TPF, performance tuning has not been done.
This port builds upon the EBCDIC changes previously made to Apache.

## Apache Configuration Files

The distributed configuration files (httpd.conf-dist and mime.types, both located in the conf subdirectory) work on TPF with only a couple of operating system specific changes to httpd.conf:

- ServerType needs to be "inetd" on pre-PUT09 systems.
- Performance considerations may dictate setting KeepAlive to "Off" (the default is "On") or lowering the Timeout value from the default 300 seconds (5 minutes) in order to reduce the number of active ECBs on your system.

## What's Available in this Version

(The Apache organization provides online documentation describing the various modules and components of the server.)

### Components/modules tested on TPF:

- alloc.c
- ap_cpystrn.c
- ap_fnmatch.c
- ap_signal.c
- ap_slack.c
- ap_snprintf.c
- buff.c
- buildmark.c
- ebcdic.c
- gen_test.char.c
- gen_uri_delims.c
- http_config.c
- http_core.c
- http_log.c
- http_main.c (see note 1)
- http_protocol.c
- http_request.c
- http_vhost.c (requires PUT9)
- logresolve.c (requires PUT10)
- mod_access.c (see note 2)
- mod_actions.c
- mod_alias.c
- mod_asis.c
- mod_auth_anon.c
- mod_autoindex.c
- mod_cern_meta.c
- mod_cgi.c (requires PUT10)
- mod_dir.c
- mod_env.c
- mod_example.c
- mod_expires.c
- mod_headers.c
- mod_imap.c
- mod_include.c (see note 3)
- mod_info.c
- mod_log_agent.c
- mod_log_config.c
- mod_log_referer.c
- mod_mime.c
- mod_mime_magic.c
- mod_negotiation.c
- mod_put.c
- mod_setenvif.c
- mod_speling.c
- mod_status.c
- mod_unique_id.c (requires PUT10)
- mod_userdir.c
- mod_usertrack.c
- os.c
- os-inline.c
- regular expression parser
- rotatelogs.c (requires PUT10)
- util.c
- util_date.c
- util_script.c
- util_uri.c

Notes:

1. "Standalone" mode requires TPF version 4.1 PUT09
2. Use of mod_access directives "`allow from`" & "`deny from`" with host names (verses ip addresses) requires TPF version 4.1 PUT10
3. CGI execution requires TPF version 4.1 PUT10

### Components/modules not yet supported on TPF:

- ap_md5c.c
- htpasswd.c
- mod_auth.c
- mod_digest.c
- mod_mmap_static.c
- mod_proxy.c
- mod_rewrite.c
- proxy_cache.c
- proxy_connect.c
- proxy_ftp.c
- proxy_http.c
- proxy_util.c
- rfc1413.c
- util_md5.c

### Components/modules that don't apply or that probably won't ever be available on TPF:

- mod_auth_db.c
- mod_auth_dbm.c
- mod_auth_db.module
- mod_so.c
- suexec.c

## Porting Notes

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

- Signals: On TPF a signal that is 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 TPF is to take an OPR-7777 dump and exit. (On UNIX the default is the equivalent of `exit()` with no dump taken.) These differences necessitated a few modifications:
  - bypass the use of `ap_block_alarms()` & `ap_unblock_alarms()`
  - add `tpf_process_signals()` calls
  - add `select()` calls in buff.c to prevent blocking.

### Find that function...

Some simple functions & definitions needed to be added on TPF, such as `FD_SET()`. We've put these in src/os/tpf/os.h for now.

### EBCDIC changes:

TPF-specific conversion tables between US-ASCII and EBCDIC (character set IBM-1047 to be exact) were created and put into ebcdic.c in the src/os/tpf directory.

### Miscellaneous, minor changes:

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

[ top | Configuration Files | What's Available | Porting Notes ]