Apache Week
   
   Issue 80, 29th August 1997:  

Copyright ©2020 Red Hat, Inc

In this issue


Apache Status

Apache Site: www.apache.org
Release: 1.2.4 (Released 22nd August 1997) (local download sites)
Beta: None
Alpha: 1.3a1 (Released 23rd July 1997) (local download sites)

Bugs fixed in 1.3:

  • The proxy module could cause the wrong header information to be logged in log files.
  • Added support for Encore UMAX V and Acorn RISCiX operating systems, and experimental support for BeOS.

Patches for Apache 1.2 bugs will be made available in the apply to 1.2.4 directory on the Apache site. Some new features and other unofficial patches are available in the 1.2 patches directory. For details of all previously reported bugs, see the Apache bug database and known bugs page. Many common configuration questions are answered in the Apache FAQ.

CERN Meta-files configurable per directory

The mod_cern_meta module is used when "meta-information" about web-accessible files is stored in a separate file. Meta-information is placed into the header of the response by Apache, and can include things like the expiry and other information about the requested file. Previously this module could only be configured for the whole server (or a particular virtual host). In the next release of Apache 1.3 will be possible to configure the use of meta information files on a per-directory basis (i.e. within <Directory> sections). This replaces the previous per-server configuration of meta information.

Authentication file relative to server root

Directives such as AuthUserFIle and AuthGroupFile take a filename as argument. In previous release of Apache this filename has to be absolute. In the next release of 1.3 it will be possible to give a relative filename, which will be taken relative to the server root. This will make it easier to change the server root - for example, when moving to a new release.

Apache control script replaces httpd_monitor

All version of Apache use a "scoreboard", which is an area of data shared between all the children processes and the parent process. The parent, for example, looks in the "scoreboard" to see how many children exist and how many are active, and creates new child processes if required. Originally this scoreboard area was stored in a file which all processes held open. A separate program, httpd_monitor (originally in perl, now in C) could be used to check the status of the child processes from the command line. Then mod_status was added which allows the status to be checked from the web, giving basically the same information as httpd_monitor.

Storing this information in a file is slow and error prone (if, for example, a signal is received which interrupts a read or write of the scoreboard file). So most modern systems use an area of shared memory for the scoreboard. mod_status works just as well with shared memory, but httpd_monitor cannot access the shared memory so does not work at all on these systems. So the httpd_monitor program will be removed from the Apache distribution, and mod_status should be used instead to check the status of Apache. The new apache control script (see Apache Week 78) will include an option to see the current status (it gets the output of mod_status by doing a web request in Lynx).

Logging server version

When Apache starts it writes a startup message to the error_log file. This message will now include the server version number from Apache 1.3 onwards. This will be useful to track problems where the wrong verson of Apache is installed, or when testing multiple versions. This version information will also include the date and time of compilation.

Configurable logging, and logging via syslog

From 1.3 onwards it will be possible to specify how much information to written to the error log. At the moment the error log contains various types of errors and warnings, and sometimes informational or debug messages. A new directive, LogLevel, will be available in 1.3 to control how much information is logged - for example, to just log errors but not warnings or other less important information.

The possible values for LogLevel will include error, warn, notice and debug. Messages logged at debug level will also include the source file and line number where the message is generated, to help debugging and code development.

In a related change, it will also be possible to send error log messages to syslog rather than a file. This is done by giving the fake name syslog as argument to ErrorLog.

TERM signal causes graceful closedown

When Apache is sent a TERM signal it kills the children straight away like a HUP signal and then dies without re-creating them. The has the effect of aborting any transfers currently in progress. From 1.3 onwards a TERM signal will instead act more like a USR1, and gracefully close down the children allowing transfers in progress to complete.

Some users have reported problems with doing a kill -9 on the Apache parent process. This is apparently the default in some Apache control scripts distributed with particular Linux distributions. It is not surprising that this causes problems since it kills the Apache parent process but not the children. The correct way to kill Apache is to send a -15 signal (TERM) to the parent process. The parent will then kill all the children (either immediately in current releases, or gracefully from 1.3 onwards). The parent should never be sent a -9 KILL signal. There should also never be a need to send an terminate signals to child processes - in fact, if a child process is killed the parent will probably just replace it.

Missing transferlog directive no longer assumed

Under previous releases of Apache, if no TransferLog directive is given then Apache assumes a log file of logs/access_log. From the next release of 1.3, if no TransferLog is given then Apache will not log transfers.

Module API Changes

A new function, set_file_slot() can be used in the definition of directives. It works like set_string_slot() except its argument can be a relative or absolute pathname. If it is relative, then the server root directory is prepended before it is stored.


Windows: long vs. short filenames

Apache 1.3 will work in Windows NT and Windows 95. Both these systems support "long" filenames, which are an attempt to get around the DOS limit of filenames (8 characters, a dot, then three more characters). Unfortunately the files are still stored in the DOS format, so actually all long filenames have two names: a long name, and a short name. This can create problems which configuring things in Apache - for example, if a <Directory> section is given with a long filename to limit a directory then a user could access the file by its short name and bypass the <Directory> restriction. Since every component of the filename can have both a long and short version it is impractical to create <Directory> sections for every possible path to the same directory.

This will be fixed in the next windows release of 1.3 by considering only long pathname components in <Directory> sections. If short components are given they will be expanded to the long form first. Similarly when a request is received and mapped to the file, the filename will be expanded to long form before being matched against the <Directory> sections.

Note that long filenames can include spaces, and the configuration file can handle spaces in filenames provided the filename is surrounded by double quotes. For example,

  ServerRoot "c:/program files/apache beta"

Apache in the news

MediaCentral online magazine has clarified an earlier article where they reported that Netscape (and Microsoft) products are the market leaders for server software. See Clarification: Apache, Indeed, the Server Market Leader.