]> granicus.if.org Git - apache/blob - docs/manual/new_features_2_2.xml
Help doc writer to spot places where:
[apache] / docs / manual / new_features_2_2.xml
1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="./style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <manualpage metafile="new_features_2_2.xml.meta">
24
25 <title>Overview of new features in Apache HTTP Server 2.2</title>
26
27 <summary>
28   <p>This document describes some of the major changes between the
29      2.0 and 2.2 versions of the Apache HTTP Server. For new features since
30      version 1.3, see the <a href="new_features_2_0.html">2.0 new features</a>
31      document.</p>
32 </summary>
33
34   <section id="core">
35     <title>Core Enhancements</title>
36     <dl>
37
38       <dt>Authn/Authz</dt>
39       <dd>The bundled authentication and authorization modules have
40           been refactored.  The new mod_authn_alias(already removed from 2.3/2.4)
41           module can greatly simplify certain authentication configurations.
42           See <a href="#module">module name changes</a>, and
43           <a href="#developer">the developer changes</a> for more
44           information about how these changes affects users and module
45           writers.</dd>
46
47       <dt>Caching</dt>
48       <dd><module>mod_cache</module>, <module>mod_cache_disk</module>, and
49           mod_mem_cache(already removed from 2.3/2.4) have undergone a lot of changes, and
50           are now considered production-quality. <program>htcacheclean</program>
51           has been introduced to clean up <module>mod_cache_disk</module>
52           setups.</dd>
53
54       <dt>Configuration</dt>
55       <dd>The default configuration layout has been simplified and
56           modularised. Configuration snippets which can be used to
57           enable commonly-used features are now bundled with Apache, and
58           can be easily added to the main server config.</dd>
59
60       <dt>Graceful stop</dt>
61       <dd>The <module>prefork</module>, <module>worker</module> and
62           <module>event</module>  MPMs now allow <program>httpd</program>
63           to be shutdown gracefully via the
64           <a href="stopping.html#gracefulstop"><code>graceful-stop</code></a>
65           signal. The <directive
66           module="mpm_common">GracefulShutdownTimeout</directive> directive
67           has been added to specify an optional timeout, after which
68           <program>httpd</program> will terminate regardless of the status
69           of any requests being served.</dd>
70
71       <dt>Proxying</dt>
72       <dd>The new <module>mod_proxy_balancer</module> module provides
73           load balancing services for <module>mod_proxy</module>.
74           The new <module>mod_proxy_ajp</module> module adds support for the
75           <code>Apache JServ Protocol version 1.3</code> used by
76           <a href="http://tomcat.apache.org/">Apache Tomcat</a>.</dd>
77
78       <dt>Regular Expression Library Updated</dt>
79       <dd>Version 5.0 of the
80           <a href="http://www.pcre.org/">Perl Compatible Regular Expression
81           Library</a> (PCRE) is now included.  <program>httpd</program> can be
82           configured to use a system installation of PCRE by passing the
83           <code>--with-pcre</code> flag to configure.</dd>
84
85       <dt>Smart Filtering</dt>
86       <dd><module>mod_filter</module> introduces dynamic configuration
87           to the output filter chain.  It enables filters to be conditionally
88           inserted, based on any Request or Response header or environment
89           variable, and dispenses with the more problematic dependencies and
90           ordering problems in the 2.0 architecture.</dd>
91
92       <dt>Large File Support</dt>
93       <dd><program>httpd</program> is now built with support for files larger
94           than 2GB on modern 32-bit Unix systems.  Support for handling
95           &gt;2GB request bodies has also been added.</dd>
96
97       <dt>Event MPM</dt>
98       <dd>The <module>event</module> MPM uses a separate thread to handle
99           Keep Alive requests and accepting connections.  Keep Alive requests
100           have traditionally required httpd to dedicate a worker to handle it.
101           This dedicated worker could not be used again until the Keep Alive
102           timeout was reached.</dd>
103
104       <dt>SQL Database Support</dt>
105       <dd><module>mod_dbd</module>, together with the <code>apr_dbd</code>
106           framework, brings direct SQL support to modules that need it.
107           Supports connection pooling in threaded MPMs.</dd>
108
109     </dl>
110   </section>
111
112   <section id="module">
113     <title>Module Enhancements</title>
114     <dl>
115       <dt>Authn/Authz</dt>
116       <dd>Modules in the aaa directory have been renamed and offer
117           better support for digest authentication.  For example,
118           <code>mod_auth</code> is now split into
119           <module>mod_auth_basic</module> and
120           <module>mod_authn_file</module>; <code>mod_auth_dbm</code> is now
121           called <module>mod_authn_dbm</module>; <code>mod_access</code> has
122           been renamed <module>mod_authz_host</module>.  There is also a new
123           mod_authn_alias(already removed from 2.3/2.4) module for simplifying
124           certain authentication configurations.
125       </dd>
126
127       <dt><module outdated="true">mod_authnz_ldap</module></dt>
128       <dd>This module is a port of the 2.0
129           <code>mod_auth_ldap</code> module to the 2.2 <code>Authn/Authz</code>
130           framework.  New features include using LDAP attribute values and
131           complicated search filters in the
132           <directive module="mod_authz_core">Require</directive> directive.</dd>
133
134       <dt><module>mod_authz_owner</module></dt>
135       <dd>A new module that authorizes access to files based
136           on the owner of the file on the file system</dd>
137
138       <dt><module>mod_version</module></dt>
139       <dd>A new module that allows configuration blocks to be enabled based on the
140           version number of the running server.</dd>
141
142       <dt><module>mod_info</module></dt>
143       <dd>Added a new <code>?config</code> argument which will show
144           the configuration directives as parsed by Apache, including
145           their file name and line number.  The module also
146           shows the order of all request hooks and additional
147           build information, similar to <code>httpd -V</code>.</dd>
148
149       <dt><module>mod_ssl</module></dt>
150       <!-- Need Info on SSLEngine Support? -->
151       <dd>Added a support for
152          <a href="http://www.ietf.org/rfc/rfc2817.txt">RFC 2817</a>, which
153          allows connections to upgrade from clear text to TLS encryption.</dd>
154
155       <dt><module>mod_imagemap</module></dt>
156       <dd><code>mod_imap</code> has been renamed to
157           <module>mod_imagemap</module> to avoid user confusion.</dd>
158     </dl>
159
160   </section>
161
162   <section id="programs">
163     <title>Program Enhancements</title>
164     <dl>
165       <dt><program>httpd</program></dt>
166       <dd>A new command line option <code>-M</code> has been added that
167       lists all modules that are loaded based on the current
168       configuration. Unlike the <code>-l</code> option, this list
169       includes DSOs loaded via <module>mod_so</module>.</dd>
170
171       <dt><program>httxt2dbm</program></dt>
172       <dd>A new program used to generate dbm files from text input,
173           for use in <directive module="mod_rewrite">RewriteMap</directive>
174           with the <code>dbm</code> map type.</dd>
175     </dl>
176   </section>
177
178   <section id="developer">
179     <title>Module Developer Changes</title>
180     <dl>
181       <dt><glossary>APR</glossary> 1.0 API</dt>
182
183       <dd>Apache 2.2 uses the APR 1.0 API.  All deprecated functions and
184           symbols have been removed from <code>APR</code> and
185           <code>APR-Util</code>. For details, see the
186           <a href="http://apr.apache.org/">APR Website</a>.</dd>
187
188       <dt>Authn/Authz</dt>
189       <dd>The bundled authentication and authorization modules have
190           been renamed along the following lines:
191           <ul>
192           <li><code>mod_auth_*</code>  -> Modules that implement an HTTP
193           authentication mechanism</li>
194           <li><code>mod_authn_*</code> -> Modules that provide a backend
195           authentication provider</li>
196           <li><code>mod_authz_*</code> -> Modules that implement
197           authorization (or access)</li>
198           <li><code>mod_authnz_*</code> -> Module that implements both
199           authentication &amp; authorization</li>
200           </ul>
201           There is a new authentication backend provider
202           scheme which greatly eases the construction of new authentication
203           backends.</dd>
204
205       <dt>Connection Error Logging</dt>
206
207       <dd>A new function, <code>ap_log_cerror</code> has been added to log
208           errors that occur with the client's connection.  When logged,
209           the message includes the client IP address.</dd>
210
211       <dt>Test Configuration Hook Added</dt>
212
213       <dd>A new hook, <code>test_config</code> has been added to aid
214           modules that want to execute special code only when the user passes
215           <code>-t</code> to <program>httpd</program>.</dd>
216
217       <dt>Set Threaded MPM's Stacksize</dt>
218
219       <dd>A new directive, <directive module="mpm_common"
220           >ThreadStackSize</directive> has been added to
221           set the stack size on all threaded MPMs.  This is required
222           for some third-party modules on platforms with small default
223           thread stack size.</dd>
224
225       <dt>Protocol handling for output filters</dt>
226
227       <dd>In the past, every filter has been responsible for ensuring
228           that it generates the correct response headers where it affects
229           them.  Filters can now delegate common protocol management to
230           <module>mod_filter</module>, using the
231           <code>ap_register_output_filter_protocol</code> or
232           <code>ap_filter_protocol</code> calls.</dd>
233
234       <dt>Monitor hook added</dt>
235       <dd>Monitor hook enables modules to run regular/scheduled jobs
236           in the parent (root) process.</dd>
237
238       <dt>Regular expression API changes</dt>
239
240       <dd>The <code>pcreposix.h</code> header is no longer available;
241       it is replaced by the new <code>ap_regex.h</code> header.  The
242       POSIX.2 <code>regex.h</code> implementation exposed by the old
243       header is now available under the <code>ap_</code> namespace
244       from <code>ap_regex.h</code>.  Calls to <code>regcomp</code>,
245       <code>regexec</code> and so on can be replaced by calls to
246       <code>ap_regcomp</code>, <code>ap_regexec</code>.</dd>
247
248       <dt>DBD Framework (SQL Database API)</dt>
249
250       <dd><p>With Apache 1.x and 2.0, modules requiring an SQL backend
251       had to take responsibility for managing it themselves.  Apart
252       from reinventing the wheel, this can be very inefficient, for
253       example when several modules each maintain their own connections.</p>
254
255       <p>Apache 2.1 and later provides the <code>ap_dbd</code> API for
256       managing database connections (including optimised strategies
257       for threaded and unthreaded MPMs), while APR 1.2 and later provides
258       the <code>apr_dbd</code> API for interacting with the database.</p>
259
260       <p>New modules SHOULD now use these APIs for all SQL database
261       operations.  Existing applications SHOULD be upgraded to use it
262       where feasible, either transparently or as a recommended option
263       to their users.</p></dd>
264     </dl>
265   </section>
266 </manualpage>