ML07-0001-0

Chapter 4. Configuring HTTPD

HTTPD takes its whole configuration from one member of a Parmlib data set. There is no other file and no command that writes the configuration. This chapter is organised by what you want to do: select the member, write it, read back what HTTPD understood, and change the port, the worker tasks, the time limits, the document root and the recording of SMF records. It ends with what HTTPD does with a bad line. The routes (MOD= and LOC=) have their own chapter, Chapter 5, “Routes and Server Modules”, and the authentication has Chapter 6, “Authentication and Security”. Every keyword, with its default and its limits, is listed in ‘The HTTPPRM Keywords’ in the HTTPD Reference.

Which Member HTTPD Reads

HTTPD reads the DD name HTTPPRM. The started task procedure points the DD name at one member of a Parmlib data set:

//HTTPPRM  DD  DSN=&D(&M),DISP=SHR,FREE=CLOSE

The procedure has two symbolic parameters for this line. M is the member, with the default HTTPPRM0. D is the data set, with the default SYS2.PARMLIB. You choose another member or another data set when you start the task. The member is the only difference between two configurations.

S HTTPD
S HTTPD,M=HTTPPRM1
S HTTPD,D='MY.PARMLIB'

The procedure and its other symbols are described in ‘The Started Task and the Package’ in the HTTPD Reference. The installation is in Chapter 2, “Installing HTTPD”.

Note: Two servers. To run a second HTTPD on the same system, give it its own PORT and so its own member. A second server on another port starts. A second server on a port that the first one holds ends with the return code 8 (“Changing the Port”).

Three things need a word:

When the DD name is missing, HTTPD writes HTTPD020W and starts with its defaults: port 8080 and no routes. A read error gives HTTPD038E and the return code 8. The effect of the missing routes shows in this capture. The path of a module is now a request for a file, and there is no such file.

$ curl -i http://localhost:8080/zosmf/info
HTTP/1.1 404 Not Found
Date: Tue, 27 Oct 2026 05:47:03 GMT
Server: HTTPD Server
X-Powered-By: MVSLOVERS
Connection: keep-alive
Cache-Control: no-store
Content-Type: text/plain
Transfer-Encoding: chunked

404 document "/zosmf/info" not found

The Format of the Member

The member has one setting on each line, in the form KEYWORD=VALUE.

A line without an equals sign gives HTTPD026W. A keyword that HTTPD does not know gives HTTPD029W. “What a Bad Line or a Bad Value Does” shows both.

A Minimal Member

A server that serves files needs very little. Everything else has a default. This member names the port and the directory of the files:

PORT=8080
DOCROOT=/www/docs

With this member HTTPD listens on port 8080, serves the files below /www/docs and has no route. Every path is a request for a file. A route is needed for a module, or for a path that must ask for a password (Chapter 5, “Routes and Server Modules”, Chapter 6, “Authentication and Security”).

A Production Member

A member for a server that has users writes down the time limits, the realm and the recording explicitly, so that the values are in the member and not only in the defaults. Every keyword in this example is described in the sections that follow. Most values are the defaults. The routes are examples. They are explained in Chapter 5, “Routes and Server Modules”.

# HTTPD production configuration
PORT=8080
MINTASK=3
MAXTASK=9
CLIENT_TIMEOUT=10
KEEPALIVE_TIMEOUT=5
KEEPALIVE_MAX=100
DOCROOT=/www
CODEPAGE=CP037
REALM=MVS.EXAMPLE
SESSION_TIMEOUT=30
SESSION_MAXAGE=480
SMF=ERROR
# routes: the first match wins
MOD=MVSMF /zosmf/info                    AUTH=NONE
MOD=MVSMF /zosmf/services/authenticate   AUTH=NONE
MOD=MVSMF /zosmf/*                       AUTH=TOKEN
LOC=/pub/*                               AUTH=NONE
LOC=/private/*                           AUTH=BASIC

The member that the captures of this guide use has more routes. Chapter 5, “Routes and Server Modules” shows it.

Reading Back What HTTPD Parsed

After the start, ask HTTPD what it holds. The command is F HTTPD,D C.

F HTTPD,D C
HTTPD100I CONS(0) "D C"
HTTPD128I PORT 8080  MINTASK 3  MAXTASK 9
HTTPD129I CLIENT_TIMEOUT 10  KEEPALIVE 5/100
HTTPD130I SESSION_TIMEOUT 30 MIN
HTTPD135I SESSION_MAXAGE 480 MIN
HTTPD131I DOCROOT /www
HTTPD134I CODEPAGE CP037
HTTPD136I REALM MVSC
HTTPD132I SMF TYPE 243 LEVEL NONE
HTTPD133I CONFIG FROM DD:HTTPPRM
HTTPD137I RESIDENT YES  MODULES HELD 0
HTTPD138I RES_NOPROFILE ALLOW

The lines show the values that are in effect, after all the limits and corrections. Each line has a message of its own:

MessageShows
HTTPD128IThe port and the least and the greatest number of worker tasks.
HTTPD129IThe client time limit, then the keep-alive time and count.
HTTPD130ISESSION_TIMEOUT in minutes.
HTTPD135ISESSION_MAXAGE in minutes.
HTTPD131IThe document root.
HTTPD134IThe code page.
HTTPD136IThe realm.
HTTPD132IThe SMF type and level.
HTTPD133IThe source of the configuration.
HTTPD137IWhether modules are resident, and how many are held.
HTTPD138IThe value of RES_NOPROFILE (“Refusing a Route Whose Profile Is Missing”).

Table 10. The lines of D C

If a line shows another value than the one you wrote, HTTPD did not read the member the way you thought. Look for a warning at the start (“What a Bad Line or a Bad Value Does”). The routes are not part of this display. The display module HTTPDSRV shows them. Chapter 8, “Operating HTTPD” describes the console commands and the display modules.

The worker task counts that D C shows are the configured values. A change with SET MI or SET MA does not appear here (“Worker Threads”).

Changing the Port

The default port is 8080. To change it, edit the member, stop the server and start it again. There is no command that moves the listener.

PORT=9090
DOCROOT=/www

After the start, ask for the port:

F HTTPD,D PORTS
HTTPD100I CONS(0) "D PORTS"
HTTPD102I HTTPD IS LISTENING ON PORT 9090

HTTPD also writes the port at start, in the message HTTPD054I. Before it listens, HTTPD takes an ENQ on the port. A second HTTPD that asks for the same port ends with HTTPD037E and the return code 8. When the bind itself fails, HTTPD tries again: BIND_TRIES (default 10) times, with BIND_SLEEP (default 10) seconds between the tries. The messages are HTTPD030E and HTTPD030I. A failure of the socket call is HTTPD028E, a failure of the listen call is HTTPD031E. LISTEN_QUEUE (default 5) is the length of the queue of connections that wait for HTTPD to accept them.

Note: A wrong port does not stop the server. A port value that is not valid gives HTTPD023E, but HTTPD goes on and listens on 8080. The member below has PORT=0. The server starts, and the message HTTPD054I names the port that it really uses. Check HTTPD054I or D PORTS after every change of the port.
PORT=0
DOCROOT=/www
S HTTPD,M=PRMBADP
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.26.58
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD023E INVALID PORT VALUE (0)
HTTPD054I LISTENING ON ANY PORT 8080
HTTPD061I STARTING SOCKET THREAD    TCB(9CDB00) TASK(100FC8) STACKSIZE(32768)
HTTPD061I STARTING WORKER(0DD1A8)   TCB(9CD410) TASK(114FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD0A8)   TCB(9CD0E0) TASK(125FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD028)   TCB(9BBCF8) TASK(136FC8) STACKSIZE(65536)
HTTPD001I HTTPD 4.5.1 READY - SERVING /www

Worker Threads

HTTPD serves each request on a worker task. The pool starts with MINTASK tasks (default 3) and can grow to MAXTASK (default 9). You see the workers at start as lines HTTPD061I STARTING WORKER. The captures in “What a Bad Line or a Bad Value Does” show three.

MINTASK=3
MAXTASK=9

In the member, both keywords accept 1 to 255. A value of 0 or less, or a text that is not a number, is ignored and the earlier value stays. A value above 255 is limited to 255.

The operator can change both numbers while the server runs, without a stop:

F HTTPD,SET MA 12
F HTTPD,SET MI 4
F HTTPD,SET MA 12
HTTPD100I CONS(0) "SET MA 12"
HTTPD107I .....EYE CTHDMGR   ....TASK 001A9FC8  .WAITECB 40000000
HTTPD108I ....FUNC 00098F1C  ...UDATA 000DB390  STACKSZE 00010000
HTTPD109I ..WORKER 000FB6D4  ...QUEUE 000FB07C  ...STATE 00000004 WAITING
HTTPD110I .MINTASK        3  .MAXTASK       12
HTTPD111I .WORKERS        3  .DISPCNT 18
HTTPD199I -------------------------------------------------------

The command answers with the lines of the worker manager. The line HTTPD110I shows the new MINTASK and MAXTASK. A raised MINTASK starts the missing workers at once. After SET MI 4, a line HTTPD061I STARTING WORKER follows.

The rules of the command differ from the rules of the member:

F HTTPD,SET MA 99999
HTTPD100I CONS(0) "SET MA 99999"
HTTPD107I .....EYE CTHDMGR   ....TASK 001A9FC8  .WAITECB 40000000
HTTPD108I ....FUNC 00098F1C  ...UDATA 000DB390  STACKSZE 00010000
HTTPD109I ..WORKER 000FB6D4  ...QUEUE 000FB07C  ...STATE 00000004 WAITING
HTTPD110I .MINTASK        3  .MAXTASK      100
HTTPD111I .WORKERS        3  .DISPCNT 18
HTTPD199I -------------------------------------------------------

The commands and their messages are described in ‘Console Commands’ in the HTTPD Reference, and their daily use in Chapter 8, “Operating HTTPD”.

Keep-Alive and Client Time Limits

Three keywords set how long HTTPD waits for a client and how often a client may reuse a connection.

KeywordDefaultMeaning
CLIENT_TIMEOUT10Seconds that HTTPD waits for the next line of a request. The largest value is 255.
KEEPALIVE_TIMEOUT5Seconds that HTTPD waits for the next request on a connection that has already carried a request.
KEEPALIVE_MAX100How many requests a connection carries before HTTPD closes it (one more is answered with Connection: close). The values are 1 to 255.

Table 11. Keywords for time and for connections

CLIENT_TIMEOUT counts for each line of the request, not for the whole request. A new connection waits for its first request line as long as CLIENT_TIMEOUT. KEEPALIVE_TIMEOUT applies from the second request on.

The Request Count of a Connection

A connection carries KEEPALIVE_MAX plus one request. HTTPD answers the last request of the connection with Connection: close. With the member

PORT=8080
DOCROOT=/www
KEEPALIVE_MAX=2
KEEPALIVE_TIMEOUT=5

the third response closes the connection:

$ curl -sv -o /dev/null -o /dev/null -o /dev/null http://localhost:8080/hello.txt http://localhost:8080/hello.txt http://localhost:8080/hello.txt 2>&1 | grep -E "Connected|Re-using|Connection|^< HTTP|Closing|keep-alive|Keep-Alive|left intact"
* Connected to localhost (::1) port 8080
< HTTP/1.1 200 OK
< Connection: keep-alive
* Connection #0 to host localhost left intact
* Re-using existing http: connection with host localhost
< HTTP/1.1 200 OK
< Connection: keep-alive
* Connection #0 to host localhost left intact
* Re-using existing http: connection with host localhost
< HTTP/1.1 200 OK
< Connection: close

The curl command uses one connection three times. The first two responses say Connection: keep-alive, the third says Connection: close. Plan with one request more than the number that you write.

The Diagnostic of a Client Time-out

When a client is too slow, HTTPD writes a line to the console. Two keywords control it. Both default to 1 (on). CLIENT_TIMEOUT_MSG writes the line, and CLIENT_TIMEOUT_DUMP adds a dump of the characters that arrived. HTTPD writes them only when the client has sent at least one character of the line. A client that sends nothing leaves nothing on the console.

The test below sets a limit of 3 seconds, sends half of a request line and waits.

PORT=8080
DOCROOT=/www
CLIENT_TIMEOUT=3
CLIENT_TIMEOUT_MSG=1
CLIENT_TIMEOUT_DUMP=1
$ exec 3<>/dev/tcp/localhost/8080
$ printf 'GET /hello.tx' >&3
$ sleep 6
$ exec 3>&-

The console shows:

client 00144FC8 on socket 1 timed out after 3 seconds
Dump of 00145028 "Receive Buffer" (13 bytes)
+00000 C7C5E340 61888593 93964BA3 A7       :GET /hello.tx   :

The first line names the address of the client block, the socket and the seconds. It is in lower case and has no message ID. The dump shows what the server received: 13 bytes, GET /hello.tx. It tells you how far the request line came before the client stopped.

Raise CLIENT_TIMEOUT for clients on slow lines. Keep SESSION_TIMEOUT and SESSION_MAXAGE longer than it (“Sessions and the Client Time Limit”).

Note: CLIENT_STATS is a third keyword of this group. It defaults to 1. HTTPD stores the flag and the display module HTTPDSRV shows it. It changes nothing else.

Sessions and the Client Time Limit

The keywords SESSION_TIMEOUT (idle minutes, default 30) and SESSION_MAXAGE (total minutes, default 480) belong to the logins that Chapter 6, “Authentication and Security” describes. This chapter shows only the check that HTTPD makes at the end of the start. HTTPD changes both values to seconds and compares them with CLIENT_TIMEOUT. If one is not larger, HTTPD writes HTTPD026E for SESSION_TIMEOUT or HTTPD032E for SESSION_MAXAGE and goes on. A limit of 0 is off and is not compared.

PORT=8080
DOCROOT=/www
CLIENT_TIMEOUT=120
SESSION_TIMEOUT=1
SESSION_MAXAGE=2
S HTTPD,M=PRMSESS
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.30.24
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD054I LISTENING ON ANY PORT 8080
HTTPD026E SESSION_TIMEOUT (1 MIN) <= CLIENT_TIMEOUT (120 SEC), RAISE IT
HTTPD032E SESSION_MAXAGE (2 MIN) <= CLIENT_TIMEOUT (120 SEC), RAISE IT
HTTPD061I STARTING SOCKET THREAD    TCB(9CDB00) TASK(100FC8) STACKSIZE(32768)
HTTPD061I STARTING WORKER(0DD1A8)   TCB(9CD410) TASK(114FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD0A8)   TCB(9CD0E0) TASK(125FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD028)   TCB(9BBCF8) TASK(136FC8) STACKSIZE(65536)
HTTPD001I HTTPD 4.5.1 READY - SERVING /www

The Document Root, the Code Page, the Time Zone and the Trace

The Document Root

DOCROOT is the UFS directory that HTTPD puts in front of the path of a request. The default is /www. The value must begin with a slash and HTTPD keeps at most 127 characters. HTTPD removes one slash at the end. A value without the first slash is ignored without a message, and the earlier value stays. Look at D C after a change.

With DOCROOT=/www/docs the request for /manual.txt reads /www/docs/manual.txt, and the request for the root gives the page index.html of that directory:

$ curl -i http://localhost:8080/manual.txt
HTTP/1.1 200 OK
Date: Tue, 27 Oct 2026 05:51:01 GMT
Server: HTTPD Server
X-Powered-By: MVSLOVERS
Connection: keep-alive
Content-Type: text/plain
X-Content-Type-Options: nosniff
Content-Length: 85

HTTPD manual draft
==================
The server serves this file from the UFS root.
$ curl -i http://localhost:8080/
HTTP/1.1 200 OK
Date: Tue, 27 Oct 2026 05:51:01 GMT
Server: HTTPD Server
X-Powered-By: MVSLOVERS
Connection: keep-alive
Cache-Control: no-store
Content-Type: text/html
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked

<!DOCTYPE html>
<html><head><title>Documents</title></head>
<body><h1>Documents</h1>
<p>This is docs/index.html.</p></body></html>

A file in the old root is no longer reachable:

$ curl -i http://localhost:8080/hello.txt
HTTP/1.1 404 Not Found
Date: Tue, 27 Oct 2026 05:51:02 GMT
Server: HTTPD Server
X-Powered-By: MVSLOVERS
Connection: keep-alive
Cache-Control: no-store
Content-Type: text/plain
Transfer-Encoding: chunked

404 document "/hello.txt" not found

The identity of the task needs READ access to the document root (Chapter 6, “Authentication and Security”). The serving of files is described in Chapter 7, “Serving Files”. The keyword UFS (default 1) tells HTTPD to create its UFS system at start. Leave it at the default.

The Code Page

CODEPAGE selects the table that translates between the ASCII on the wire and the EBCDIC in HTTPD. The names are CP037 (the default), IBM1047 and LEGACY, in any case. LEGACY is the table of HTTPD 3.3.x. An empty value is CP037. Another name gives HTTPD070E, and HTTPD uses CP037. D C shows the name as the member has it (HTTPD134I), also when it is not one of the three.

The Time Zone

There is no Parmlib keyword for the time zone. HTTPD takes the offset from the system. The command F HTTPD,D TI shows the time in GMT and the local time with the offset in minutes:

F HTTPD,D TI
HTTPD100I CONS(0) "D TI"
HTTPD142I TIME 2026/10/27 05:44:39 GMT
HTTPD143I TIME 2026/10/27 00:44:39 LOCAL OFFSET=-300

The Date header of every response is in GMT. The old keyword TZOFFSET is retired (“Retired Keywords”). The message that it gives ends with the text SET TZ IN THE SYSENV OR ENVIRON DD TO OVERRIDE IT FOR ALL TASKS.

The Trace

DEBUG=1 switches the trace on. It has one level: a value above 0 means on and 5 means the same as 1. With the trace on, HTTPD writes its trace lines to the DD name HTTPDBG of the procedure. If HTTPD cannot open the DD name, it writes HTTPD020E and HTTPD021I, and the trace goes to SYSTERM. If a write to the trace fails, for example because the data set is full, HTTPD writes HTTPD039W once, switches the trace off and goes on. The trace stays off until the next start, and it ends at the point of the failure. Give the DD name more room and restart the server to trace again. Use the trace for a problem and switch it off after it. Chapter 12, “Troubleshooting” helps with problems. The trace of DEBUG is not the request trace of the next section.

The Request Trace

When a request is slow, you need to know where its time went. The request trace is a table inside the server. For each request it records the time of each phase (the request line, the credential, the module, the send) and a few counters. You read it with curl. The trace is off by default, and it is not the trace of DEBUG (“The Document Root, the Code Page, the Time Zone and the Trace”). This section switches it on, checks it and switches it off. How to find a slow request with it is in “A Request Is Slow”.

Switch the trace on with the keyword TRACE. Its value is the number of requests that the table holds: 0, or a number from 16 to 1024. The value 0 is off. This member holds 64 requests. The routes are the ones of the lab server, and the route of HTTPDSRV is the one that shows the table:

PORT=8080
DOCROOT=/www
TRACE=64
MOD=MVSMF /zosmf/info                    AUTH=NONE
MOD=MVSMF /zosmf/services/authenticate   AUTH=NONE
MOD=MVSMF /zosmf/*                       AUTH=TOKEN
MOD=HTTPDSRV /.dsrv                      AUTH=FORM
LOC=/pub/*                               AUTH=NONE

The server reads the keyword at the start, and no command changes it. Stop the server and start it again. The message HTTPD066I says that the trace is on, how many requests the table holds and how much storage it uses:

S HTTPD,M=TRCON
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.28.35
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD036I MODULE MVSMF REGISTERED FOR /zosmf/info
HTTPD036I MODULE MVSMF REGISTERED FOR /zosmf/services/authenticate
HTTPD036I MODULE MVSMF REGISTERED FOR /zosmf/*
HTTPD036I MODULE HTTPDSRV REGISTERED FOR /.dsrv
HTTPD417I LOCATION /pub/* REGISTERED
HTTPD054I LISTENING ON ANY PORT 8080
HTTPD066I REQUEST TRACE ON, 64 RECORDS, 8736 BYTES
HTTPD061I STARTING SOCKET THREAD    TCB(9CD6E8) TASK(177FC8) STACKSIZE(32768)
HTTPD061I STARTING WORKER(180B40)   TCB(9BBDD8) TASK(18EFC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(180A40)   TCB(9BBAA8) TASK(19FFC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(1809C0)   TCB(9BB298) TASK(1B0FC8) STACKSIZE(65536)
HTTPD001I HTTPD 4.5.1 READY - SERVING /www

Each record needs 136 bytes, and the block has a header of 32 bytes. 64 records are 8,736 bytes, 256 are 34,848 and 1024 are 139,296. The server gets the block from its region at the start and frees it at the stop. If the region has no room for it, the server writes HTTPD067W and runs without the trace. Give the task a larger region, or a smaller value.

The table holds the most recent requests, and a new request replaces an old one. Choose a number that is larger than the number of requests that the server serves in the time you want to look back. 64 is enough to start with.

The display module HTTPDSRV shows the table, with the target TRACE. Without a route for HTTPDSRV there is no way to read the trace (“The Display Modules over HTTP”). On a server where the trace is off, the answer is one line:

$ curl -s -u IBMUSER:****** "http://localhost:8080/.dsrv?target=TRACE"
#HTTPTRC off

A value that is not valid does not stop the start. The server writes HTTPD444W and runs with the trace off. A value of 8 is too small:

PORT=8080
DOCROOT=/www
TRACE=8
MOD=MVSMF /zosmf/info                    AUTH=NONE
MOD=MVSMF /zosmf/services/authenticate   AUTH=NONE
MOD=MVSMF /zosmf/*                       AUTH=TOKEN
MOD=HTTPDSRV /.dsrv                      AUTH=FORM
LOC=/pub/*                               AUTH=NONE
S HTTPD,M=TRCBAD
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.27.14
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD444W INVALID TRACE VALUE "8" (0 OR 16-1024), TRACE OFF
HTTPD036I MODULE MVSMF REGISTERED FOR /zosmf/info
HTTPD036I MODULE MVSMF REGISTERED FOR /zosmf/services/authenticate
HTTPD036I MODULE MVSMF REGISTERED FOR /zosmf/*
HTTPD036I MODULE HTTPDSRV REGISTERED FOR /.dsrv
HTTPD417I LOCATION /pub/* REGISTERED
HTTPD054I LISTENING ON ANY PORT 8080
HTTPD061I STARTING SOCKET THREAD    TCB(9CD6E8) TASK(177FC8) STACKSIZE(32768)
HTTPD061I STARTING WORKER(189D00)   TCB(9BBDD8) TASK(18BFC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(189C00)   TCB(9BBAA8) TASK(19CFC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(189B80)   TCB(9BB778) TASK(1ADFC8) STACKSIZE(65536)
HTTPD001I HTTPD 4.5.1 READY - SERVING /www

To switch the trace off, remove the line or write TRACE=0, and restart the server.

Note: The table holds the address of the client and the first 23 characters of the path of every request, and anyone who may call the route of HTTPDSRV can read them. Switch the trace on to look for a problem, and off when you have found it. Give the route of HTTPDSRV an AUTH= (“What authentication they need”).

Recording SMF Records

HTTPD can write one SMF record for a request, and one for a connection. The default is that it writes none. To switch the recording on, choose a level.

LevelHTTPD writes
NONENo record. This is the default.
ERRORA request record for each request with the status 400 or more.
AUTHThe same requests as ERROR. The level is named for the statuses 401 and 403.
ALLA request record for every request, and a session record for every connection.

Table 12. The SMF levels

There are two ways to set the level.

  1. Write SMF=ALL in the member. The level is in effect from the start. With SMF=ALL TYPE=244 you also choose the record type. The default type is 243, and the type must be in the range 128 to 255.
  2. Use the command F HTTPD,SET STATS ALL while the server runs. The change lasts until the server stops. It does not change the member.
F HTTPD,SET STATS ALL
HTTPD100I CONS(0) "SET STATS ALL"
HTTPD126I SMF LEVEL SET TO ALL

Check the level with D C. The line HTTPD132I shows the type and the level (the capture in “Reading Back What HTTPD Parsed”). In the member, HTTPD compares the level with the four names for as many characters as you write. ERR is ERROR. A is AUTH, because AUTH comes before ALL. Write the whole name. The console command SET STATS accepts only the whole name. A word that is no level gives HTTPD431W in the member and HTTPD126E at the console. A type outside the range gives HTTPD432W.

F HTTPD,SET STATS BOGUS
HTTPD100I CONS(0) "SET STATS BOGUS"
HTTPD126E INVALID SET STATS VALUE "BOGUS"

If the level is above NONE at the start and SMF is not active in the system, HTTPD writes HTTPD430W. The server runs and writes no records. It tests for each record whether SMF is active, so the records start when SMF becomes active.

To find the records, select the record type (243 unless you chose another) with the SMF dump program of your site. The SMF parameters of the installation decide whether the system keeps that type. The layout of both records, field by field, is in ‘SMF Records’ in the HTTPD Reference. The counters that the display commands show (requests, errors, bytes) count at every level, also at NONE.

What a Bad Line or a Bad Value Does

HTTPD does not stop for most typing errors in the member. It writes a message, skips the line, and starts. After each change of the member, read the console lines between HTTPD000I and HTTPD001I.

A Line Without an Equals Sign

A line that is not a comment and has no equals sign gives HTTPD026W with the text of the line.

PORT=8080
DOCROOT=/www
this line has no equals sign
S HTTPD,M=PRMLINE
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.26.43
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD026W UNRECOGNIZED CONFIGURATION LINE: this line has no equals sign
HTTPD054I LISTENING ON ANY PORT 8080
HTTPD061I STARTING SOCKET THREAD    TCB(9CDB00) TASK(100FC8) STACKSIZE(32768)
HTTPD061I STARTING WORKER(0DD1A8)   TCB(9CD410) TASK(114FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD0A8)   TCB(9CD0E0) TASK(125FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD028)   TCB(9BBCF8) TASK(136FC8) STACKSIZE(65536)
HTTPD001I HTTPD 4.5.1 READY - SERVING /www

An Unknown Keyword

A keyword that HTTPD does not know gives HTTPD029W with the keyword. A misspelling of a real keyword looks the same. The setting is not applied, so the default stays.

PORT=8080
DOCROOT=/www
COLOUR=BLUE
S HTTPD,M=PRMKEY
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.26.28
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD029W UNKNOWN CONFIGURATION KEYWORD: COLOUR
HTTPD054I LISTENING ON ANY PORT 8080
HTTPD061I STARTING SOCKET THREAD    TCB(9CDB00) TASK(100FC8) STACKSIZE(32768)
HTTPD061I STARTING WORKER(0DD1A8)   TCB(9CD410) TASK(114FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD0A8)   TCB(9CD0E0) TASK(125FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD028)   TCB(9BBCF8) TASK(136FC8) STACKSIZE(65536)
HTTPD001I HTTPD 4.5.1 READY - SERVING /www

A Bad Value

What happens to a value that is not valid depends on the keyword. There are four cases:

ReactionKeywords and example
KeptThe earlier value stays and HTTPD writes nothing. A MINTASK of 0 or a text, and a DOCROOT that does not start with a slash, are of this kind.
LimitedHTTPD changes the value to the nearest allowed one. A MAXTASK of 300 becomes 255. KEEPALIVE_MAX is limited to 1 to 255.
Read as 0A text that is not a number counts as 0. For the flags such as DEBUG and UFS this means off.
MessageA named value has its own warning: HTTPD070E for the code page, HTTPD424W for the realm, HTTPD431W and HTTPD432W for SMF, HTTPD443W for RESIDENT, HTTPD023E for the port (the server goes on with 8080), HTTPD444W for TRACE (the trace stays off).

Table 13. The reactions to a bad value

Because the first case is silent, check the result with D C (“Reading Back What HTTPD Parsed”).

Refusals

In some cases HTTPD does not start. The message HTTPD420E says that the authorization policy of the routes is incomplete. The server ends with the return code 8. Two causes are the common ones.

PORT=8080
DOCROOT=/www
LOC=/pub/*  AUTH=BASC
S HTTPD,M=PRMAUTH
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.28.50
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD411E UNKNOWN AUTH MODE 'BASC' -- USE NONE, FORM, BASIC OR TOKEN
HTTPD419E LOC=/pub/* COULD NOT BE REGISTERED -- ITS AUTH POLICY IS LOST
HTTPD420E ROUTE AUTHORIZATION POLICY INCOMPLETE -- HTTPD WILL NOT START
HTTPD098I HTTPD SHUTTING DOWN
HTTPD416I STATS: 0 REQUESTS, 0 ERRORS, 0 BYTES
HTTPD099I HTTPD SHUTDOWN COMPLETE
IEF404I HTTPD - ENDED - TIME=05.28.50
$HASP395 HTTPD    ENDED

Chapter 6, “Authentication and Security” explains the values of AUTH=. The messages are in ‘Messages’ in the HTTPD Reference.

Retired Keywords

Older members may contain keywords that HTTPD no longer uses. Each one gets a message so that nobody believes it still works.

KeywordMessageWhat to do
LOGIN=HTTPD048W for an empty value or NONE, otherwise HTTPD048E and HTTPD420EDelete it and write AUTH= on each route. Any value other than NONE refuses the start, because the routes without AUTH= would turn public.
TZOFFSET=HTTPD025W, then HTTPD025IDelete it. The offset of the system applies (“The Document Root, the Code Page, the Time Zone and the Trace”).
RECLAIM=HTTPD422WAn option of a MOD route, not a keyword. Delete it. The message says that the reclaim of the storage of modules is always on.
CGI=HTTPD410WWrite MOD= instead. HTTPD reads the line as a MOD= route.

Table 14. The retired keywords

With this member

PORT=8080
DOCROOT=/www
LOGIN=NONE

HTTPD starts, and the console shows:

S HTTPD,M=PRMLOGN
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.27.29
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD048W LOGIN IS RETIRED -- USE AUTH= ON EACH MOD=/LOC= ROUTE
HTTPD054I LISTENING ON ANY PORT 8080
HTTPD061I STARTING SOCKET THREAD    TCB(9CDB00) TASK(100FC8) STACKSIZE(32768)
HTTPD061I STARTING WORKER(0DD1A8)   TCB(9CD410) TASK(114FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD0A8)   TCB(9CD0E0) TASK(125FC8) STACKSIZE(65536)
HTTPD061I STARTING WORKER(0DD028)   TCB(9BBCF8) TASK(136FC8) STACKSIZE(65536)
HTTPD001I HTTPD 4.5.1 READY - SERVING /www

With LOGIN=BASIC the start is refused:

PORT=8080
DOCROOT=/www
LOGIN=BASIC
S HTTPD,M=PRMLOGB
$HASP100 HTTPD    ON STCINRDR
$HASP373 HTTPD    STARTED
IEF403I HTTPD - STARTED - TIME=05.27.44
HTTPD000I HTTPD 4.5.1 (nnnnnnn) STARTING
HTTPD005I LIBC370 2.26.0 (3AA3B28)
HTTPD002I AUTHORIZED BY SVC (MODULE KEY 8)
HTTPD004I STC IDENTITY SET TO HTTPD/USER VIA RACINIT
RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:HTTPPRB
HTTPD048E LOGIN BASIC IS RETIRED -- ROUTES WITHOUT AUTH= WOULD BECOME PUBLIC
HTTPD420E ROUTE AUTHORIZATION POLICY INCOMPLETE -- HTTPD WILL NOT START
HTTPD098I HTTPD SHUTTING DOWN
HTTPD416I STATS: 0 REQUESTS, 0 ERRORS, 0 BYTES
HTTPD099I HTTPD SHUTDOWN COMPLETE
IEF404I HTTPD - ENDED - TIME=05.27.44
$HASP395 HTTPD    ENDED