D. J. Bernstein
Internet publication
publicfile
Log information
httpd
prints one line to standard error
for each GET or HEAD request.
ftpd
prints one line to standard error
for each RETR, LIST, or NLST request.
Each line contains the following information:
- The remote IP address, followed by a space.
The address is obtained from $TCPREMOTEIP.
- The type of request:
read for file contents,
dir for a directory listing.
- The file name involved in the request, followed by a colon and a space.
Inside the name,
spaces are replaced by underscores;
control characters and 8-bit characters are replaced by question marks.
If the name is 100 bytes or longer,
it is truncated at 100 bytes and followed by three dots.
- The result of attempting to open the file.
This is either success or an error message.
Error messages may contain more information than
what was supplied to the client.
In the standard configuration created by
configure,
these lines of log information appear with timestamps in
two automatically rotated log directories:
/public/httpd/log/main and
/public/ftpd/log/main.
The same logs also contain connection messages from tcpserver:
- status lines showing the number of active connections;
- pid lines showing the process ID assigned to a new connection;
- ok lines showing the remote IP address and port number; and
- end lines showing the httpd or ftpd exit status.
There are several possibilities for the exit status:
- 0: Connection closed, connection reset, connection failure, or timeout.
This is normal.
- 5120 (code 20): Unable to chdir() to the public file area.
This usually indicates a manual configuration error.
- 5376 (code 21): Out of memory.
This usually indicates that a client has sent an excessively long request.
- 5632 (code 22): Error in socket(), bind(), or listen().
This usually indicates that the kernel is overloaded with sockets.
- 5888 (code 23): Temporary error in
open(), opendir(), fchdir(), stat(), fstat(), or read() from disk.
This usually indicates a disk hardware problem,
but can occur if the kernel is overloaded.
- 7680 (code 30): Error in chroot(), setgid(), setgroups(), or setuid().
This usually indicates a manual configuration error.
httpd and ftpd do not report temporary errors to the client
before closing the connection.