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
Configurationhave 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.
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_configcan be compile-time configured to buffer writes.
ap_cpystrn(), a routine which doesn't have to zero-fill the entire result. This has dramatic effects on
See the new performance documentation for more information.
configurescript and a corresponding top-level
Makefile.tmplfile. The goal is to provide a GNU Autoconf-style frontend which is capable to both drive the old
src/Configurestuff 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.
apxswas 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
/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.
NameVirtualHostdirective 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.
Includedirective includes other config files immediately at that point in parsing.
-Scommand line option it will dump out information regarding how it parsed the
VirtualHostsections. This is useful for folks trying to debug their virtual host configuration.
SetEnvIfNoCase. These allow you to set environment variables for server and CGI use based upon attributes of the request.
mod_mime_magichas 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.
ProxyViadirective allows switching "Via:" support off or on, or suppressing outgoing "Via:" header lines altogether for privacy reasons.
ProxyDomaindirectives added to proxy, useful for intranets.
ProxyPassReversedirective. It lets Apache adjust the URL in the Location header on HTTP redirect responses.
mod_dirmodule 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.
SuppressHTMLPreamblecan be used if your README.html file includes its own HTML header.
IndexOptionsdirective 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.
IconWidthlet you set height and width attributes to the
<IMG>tag in directory listings.
NameWidthkeyword 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.
RedirectMatchdirectives allow for the use of regular expression matching. Additionally, new
<FilesMatch>sections provide a new syntax for regular expression sectioning.
AddModuleInfodirective added to mod_info
TransferLogdirective is given then no log is written. This supports co-existence with other logging modules.
LogFormatdirective has been enhanced to allow you to give nicknames to specific logging formats. You can then use these nicknames in other
CustomLogdirectives, rather than having to spell out the complete log format string each time.
RewriteMapdirective 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_exitfunctions 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
initfunction is passed a pool whose lifetime ends when the parent exits or restarts.
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.
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_modifiedsplit into three
set_last_modifiedperformed multiple jobs including the setting of the
ETagheader, and processing conditional requests (such as IMS). These functions have been split into three functions:
meets_conditions. The field
mtimehas been added to
ap_log_error. This is still a work in progress.
set_file_slotfor config parsing
set_file_slotroutine provides a standard routine that prepends ServerRoot to non-absolute paths.
pclosesocketfunctions allow for race-condition free socket creation with resource tracking. Similarly
pclosedirprotect directory reading.
ap_spawn_childfunctions which prevents Apache from aggressively trying to kill off the child.
alloc debugging code
ALLOC_DEBUGprovides 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_MALLOCwill cause the alloc code to use
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.cfor more details.
strncpy"lookalike", with slightly different semantics is much faster than
strncpybecause it doesn't have to zero-fill the entire buffer.
pstrdupon their arguments. This provides for big speedups. There is also some debugging support to ensure code uses them properly. See
src/CHANGESfor more information.
server_rec *to taking a
spawnfunction (as passed to
ap_bspawn_child) and to
ap_call_execto allow children to work correctly on Win32. We also cleaned up the nomenclature a bit, replacing
Server:header line. Previous 1.3beta versions had used a
#defineto perform this function. Whether the tokens are actually displayed is controlled by the new
AccessFileNamedirective 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.
HostNameLookupsnow defaults to "Off"
HostNameLookupsdirective 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.
HostnameLookupsdirective 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.)
timefmtstring used by
mod_includehas been modified to display the year using four digits rather than the two-digit format used previously. The
mod_autoindexmodule 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
UseCanonicalName offApache will use the hostname and port supplied by the client, if available.
SERVER_VERSIONdefinition abstracted, and server build date added
#defined 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_VERSIONsymbol 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
Serverresponse header field which is sent back to clients. The
ServerTokensdirective 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.