New features with this release, as extensions of the Apache functionality. Because the core code has changed so significantly, there are certain liberties that earlier versions of Apache (and the NCSA daemon) took that recent Apache versions are pickier about - please check the compatibility notes if you have any problems.
If you're upgrading from Apache 1.2, you may wish to read the upgrade notes.
Enhancements: Core | Performance | Configuration | Modules | API | Misc
Configuration
have been replaced with "AddModule" with a slightly different syntax. For module authors there are some changes designed to make it easier for users to add their module.ProxyReceiveBufferSize
directive gives mod_proxy
's outgoing connections larger network buffers, for increased throughput.writev
(where available) to issue multiple writes with a single system call. They also avoid copying memory into buffers as much as possible. The result is less CPU time spent on transferring large files.mmap
, which means bytes are only copied from the disk buffer to the network buffer directly by the kernel. The program never copies bytes around, which reduces CPU time. (Only where available/tested.)mod_log_config
can be compile-time configured to buffer writes.strncpy()
with ap_cpystrn()
, a routine which doesn't have to zero-fill the entire result. This has dramatic effects on mod_include
speed.See the new performance documentation for more information.
configure
script and a corresponding top-level Makefile.tmpl
file. The goal is to provide a GNU Autoconf-style frontend which is capable to both drive the old src/Configure
stuff in batch and additionally installs the package with a GNU-conforming directory layout. Any options from the old configuration scheme are available plus a lot of new options for flexibly customizing Apache.README.configure
and INSTALL
for more information.apxs
was created which provides off-source building, installing and activating of those DSO-based modules. It completely hides the platform-dependent DSO-build commands from the user and provides an easy way to build modules outside the Apache source tree. To achieve this APACI installs the Apache C header files together with the apxs
tool./usr/local/apache/
/usr/local/etc/httpd/
to /usr/local/apache/
. This change covers only the default setting (and the documentation); it is of course possible to override it using the -d ServerRoot and -f httpd.conf switches when starting apache.NameVirtualHost
directive is used to list IP address:port pairs on which HTTP/1.1-style virtual hosting occurs. This is vhosting based on the Host:
header from the client. Previously this address was implicitly the same as the "main address" of the machine, and this caused no end of problems for users, and was not powerful enough. Please see the Apache Virtual Host documentation for further details on configuration.Include
directiveInclude
directive includes other config files immediately at that point in parsing.-S
command line option it will dump out information regarding how it parsed the VirtualHost
sections. This is useful for folks trying to debug their virtual host configuration.SetEnvIf
and SetEnvIfNoCase
. These allow you to set environment variables for server and CGI use based upon attributes of the request.mod_mime_magic
has been added. It uses "magic numbers" and other hints from a file's contents to figure out what the contents are. It then uses this information to set the file's media type, if it cannot be determined by the file's extension.UNIQUE_ID
.ProxyVia
directive allows switching "Via:" support off or on, or suppressing outgoing "Via:" header lines altogether for privacy reasons.NoProxy
and ProxyDomain
directives added to proxy, useful for intranets.ProxyPassReverse
directive. It lets Apache adjust the URL in the Location header on HTTP redirect responses.mod_include
string comparisonsmod_dir
module has been split in two, with mod_dir handling directory index files, and mod_autoindex creating directory listings. Thus allowing folks to remove the indexing function from critical servers.SuppressColumnSorting
IndexOptions keyword.SuppressHTMLPreamble
can be used if your README.html file includes its own HTML header.IndexOptions
directive now allows the use of incremental prefixes (+/- to add/remove the respective keyword feature, as was already possible for the Options directive) to its keyword arguments. Multiple IndexOptions directives applying to the same directory will now be merged.IconHeight
and IconWidth
let you set height and width attributes to the <IMG>
tag in directory listings.NameWidth
keyword to the IndexOptions directive lets you set the number of columns for "fancy" directory listings. If set to an '*' asterisk, the name width will be adjusted automatically.Alias
and Redirect
AliasMatch
, ScriptAliasMatch
, and RedirectMatch
directives allow for the use of regular expression matching. Additionally, new <DirectoryMatch>
, <LocationMatch>
, and <FilesMatch>
sections provide a new syntax for regular expression sectioning.AddModuleInfo
directive added to mod_infoTransferLog
disables loggingTransferLog
directive is given then no log is written. This supports co-existence with other logging modules.LogFormat
directive has been enhanced to allow you to give nicknames to specific logging formats. You can then use these nicknames in other LogFormat
and CustomLog
directives, rather than having to spell out the complete log format string each time.RewriteMap
directiveRewriteMap
directive of mod_rewrite. They provide two new features: First, you now can randomly choose a sub-value from a value which was looked-up in a rewriting map (which is useful when choosing between backend servers in a Reverse Proxy situation). Second, you now can translate URL parts to fixed (upper or lower) case (which is useful when doing mass virtual hosting by the help of mod_rewrite).For all those module writers and code hackers:
child_init
child_exit
child_init
and child_exit
functions are passed a pool whose lifetime is the same as the lifetime of the child (modulo completely fatal events in which apache has no hope of recovering). In contrast, the module init
function is passed a pool whose lifetime ends when the parent exits or restarts.child_terminate
register_other_child
http_main.h
. This is used in the parent to register a child for monitoring. The parent will report status to a supplied callback function. This allows modules to create their own children which are monitored along with the httpd children.piped_log
http_log.h
. This API provides the common code for implementing piped logs. In particular it implements a reliable piped log on architectures supporting it (i.e., Unix at the moment).set_last_modified
split into threeset_last_modified
performed multiple jobs including the setting of the Last-Modified
header, the ETag
header, and processing conditional requests (such as IMS). These functions have been split into three functions: set_last_modified
, set_etag
, and meets_conditions
. The field mtime
has been added to request_rec
to facilitate meets_conditions
.ap_log_error
ap_log_error
. This is still a work in progress.set_file_slot
for config parsingset_file_slot
routine provides a standard routine that prepends ServerRoot to non-absolute paths.post_read_request
module APIpsocket
, and popendir
psocket
and pclosesocket
functions allow for race-condition free socket creation with resource tracking. Similarly popendir
and pclosedir
protect directory reading.is_initial_req
kill_only_once
ap_spawn_child
functions which prevents Apache from aggressively trying to kill off the child.alloc debugging code
ALLOC_DEBUG
provides a rudimentary memory debugger which can be used on live servers with low impact -- it sets all allocated and freed memory bytes to 0xa5. Defining ALLOC_USE_MALLOC
will cause the alloc code to use malloc()
and free()
for each object. This is far more expensive and should only be used for testing with tools such as Electric Fence and Purify. See main/alloc.c
for more details.ap_cpystrn
strncpy
"lookalike", with slightly different semantics is much faster than strncpy
because it doesn't have to zero-fill the entire buffer.table_addn
, table_setn
, table_mergen
pstrdup
on their arguments. This provides for big speedups. There is also some debugging support to ensure code uses them properly. See src/CHANGES
for more information.construct_url
server_rec *
to taking a request_rec *
.get_server_name
, get_server_port
ap_bspawn_child
and ap_call_exec
child_info *
to spawn
function (as passed to ap_bspawn_child
) and to ap_call_exec
to allow children to work correctly on Win32. We also cleaned up the nomenclature a bit, replacing spawn_child_err
with simply ap_spawn_child
and spawn_child_err_buff
with simply ap_bspawn_child
.ap_add_version_component()
Server:
header line. Previous 1.3beta versions had used a SERVER_SUBVERSION
compile-time #define
to perform this function. Whether the tokens are actually displayed is controlled by the new ServerTokens
directive.AccessFileName
EnhancementAccessFileName
directive can now take more than one filename. This lets sites serving pages from network file systems and more than one Apache web server, configure access based on the server through which shared pages are being served.HostNameLookups
now defaults to "Off"HostNameLookups
directive now defaults to "Off". This means that, unless explicitly turned on, the server will not resolve IP addresses into names. This was done to spare the Internet from unnecessary DNS traffic.HostnameLookups
directive now supports double-reverse DNS. (Known as PARANOID in the terminology of tcp_wrappers.) An IP address passes a double-reverse DNS test if the forward map of the reverse map includes the original IP. Regardless of the HostnameLookups setting, mod_access access lists using DNS names require all names to pass a double-reverse DNS test. (Prior versions of Apache required a compile-time switch to enable double-reverse DNS.)timefmt
string used by mod_include
has been modified to display the year using four digits rather than the two-digit format used previously. The mod_autoindex
module has also been modified to display years using four digits in FancyIndexed directory listings.htdigest
), and these other applications would fail to build because the routines were built only into the server. These routines are now being migrated to a separate subdirectory and library so they can be used by other applications than just the server. See the src/ap/
subdirectory.ServerSignature
directiveUseCanonicalName
directiveUseCanonicalName off
Apache will use the hostname and port supplied by the client, if available.SERVER_VERSION
definition abstracted, and server build date added#define
d value for SERVER_VERSION
. In order to keep this value consistent when modules and the core server are compiled at different times, this information is now available through the core API routine ap_get_server_version()
. The use of the SERVER_VERSION
symbol is deprecated. Also, ap_get_server_built()
returns a string representing the time the core server was linked.ServerTokens
, allows the Webmaster to change the value of the Server
response header field which is sent back to clients. The ServerTokens
directive controls whether the server will include a non-specific note in the server identity about the type of operating system on which the server is running as well as included module information. As of Apache 1.3, this additional information is included by default.{SHA1}
are taken as Base64 encoded SHA1 passwords. More information and some utilities to convert Netscape ldap/ldif entries can be found in support/SHA1.