]> granicus.if.org Git - apache/blob - docs/manual/new_features_2_4.xml
Mention mod_heartmonitor/mod_lbmethod_heartbeat, mod_sed, mod_auth_form,
[apache] / docs / manual / new_features_2_4.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_4.xml.meta">
24
25 <title>Overview of new features in Apache HTTP Server 2.4</title>
26
27 <summary>
28   <p>This document describes some of the major changes between the
29      2.2 and 2.4 versions of the Apache HTTP Server. For new features since
30      version 2.0, see the <a href="new_features_2_2.html">2.2 new features</a>
31      document.</p>
32 </summary>
33
34   <section id="core">
35     <title>Core Enhancements</title>
36     <dl>
37       <dt>KeepAliveTimeout in milliseconds</dt>
38       <dd>It is now possible to specify <directive module="core"
39       >KeepAliveTimeout</directive> in milliseconds.
40       </dd>
41
42       <dt>Loadable MPMs</dt>
43       <dd>Multiple MPMs can now be built as loadable modules at compile time.
44       The MPM of choice can be configured at run time.</dd>
45
46       <dt>Per-module and per-directory LogLevel configuration</dt>
47       <dd>The <directive module="core">LogLevel</directive> can now be
48       configured per module and per directory.  New levels <code>trace1</code>
49       to <code>trace8</code> have been added above the <code>debug</code> log
50       level.</dd>
51
52       <dt>Event MPM</dt>
53       <dd>The Event MPM is no longer experimental but is now fully supported.</dd>
54
55       <dt>Asynchronous support</dt>
56       <dd>Better support for asynchronous read/write for supporting MPMs and
57       platforms.</dd>
58
59       <dt>Per-request configuration sections</dt>
60       <dd>&lt;<directive module="core">If</directive>&gt; sections can be used to
61       set the configuration based on per-request criteria</dd>
62
63       <dt>General-purpose expression parser</dt>
64       <dd>A new expression parser allows to specify
65           <a href="expr.html">complex conditions</a> using a common syntax
66           in directives like
67           <directive module="mod_setenvif">SetEnvIfExpr</directive>,
68           <directive module="mod_rewrite">RewriteCond</directive>,
69           <directive module="mod_headers">Header</directive>,
70           <directive module="mod_headers" type="section">If</directive>,
71           and others.
72       </dd>
73
74       <dt>Reduced memory usage</dt>
75       <dd>Despite many new features, 2.4.x tends to use less memory than
76       2.2.x.</dd>
77
78       <dt>NameVirtualHost directive</dt>
79       <dd>No longer needed and is now deprecated.</dd>
80
81     </dl>
82   </section>
83
84   <section id="newmods">
85     <title>New Modules</title>
86     <dl>
87       <dt><module>mod_allowmethods</module></dt>
88       <dd>New module to restrict certain HTTP methods without interfering with
89       authentication or authorization.</dd>
90
91       <dt><module>mod_buffer</module></dt>
92       <dd>Provides for buffering the input and output filter stacks</dd>
93
94       <dt><module>mod_data</module></dt>
95       <dd>Convert response body into an RFC2397 data URL</dd>
96
97       <dt><module>mod_lua</module></dt>
98       <dd>Embeds the <a href="http://www.lua.org/">Lua</a> language into httpd,
99       for configuration and small business logic functions. (Experimental)</dd>
100
101       <dt><module>mod_proxy_express</module></dt>
102       <dd>Provides dynamically configured mass reverse proxies for <module>mod_proxy</module></dd>
103
104       <dt><module>mod_proxy_fcgi</module></dt>
105       <dd>FastCGI Protocol backend for <module>mod_proxy</module></dd>
106
107       <dt><module>mod_proxy_scgi</module></dt>
108       <dd>SCGI Protocol backend for <module>mod_proxy</module></dd>
109
110       <dt><module>mod_ratelimit</module></dt>
111       <dd>Provides Bandwidth Rate Limiting for Clients</dd>
112
113       <dt><module>mod_reflector</module></dt>
114       <dd>Provides Reflection of a request body as a response via the output filter stack.</dd>
115
116       <dt><module>mod_remoteip</module></dt>
117       <dd>Replaces the apparent client remote IP address and hostname for the request
118       with the IP address list presented by a proxies or a load balancer via
119       the request headers.</dd>
120
121       <dt><module>mod_request</module></dt>
122       <dd>Provides Filters to handle and make available HTTP request bodies</dd>
123
124       <dt><module>mod_slotmem_shm</module></dt>
125       <dd>Provides a Slot-based shared memory provider (ala the scoreboard).</dd>
126
127       <dt><module>mod_log_debug</module></dt>
128       <dd>Allows to add customizable debug logging at different phases of the
129       request processing.</dd>
130
131       <dt><module>mod_xml2enc</module></dt>
132       <dd>Formerly a third-party module, this supports internationalisation
133       in libxml2-based (markup-aware) filter modules.</dd>
134
135       <dt><module>mod_proxy_html</module></dt>
136       <dd>Formerly a third-party module, this supports fixing of HTML
137       links in a reverse proxy situation, where the backend generates
138       URLs that are not valid for the proxy's clients.</dd>
139
140       <dt><module>mod_heartmonitor</module>,
141           <module>mod_lbmethod_heartbeat</module></dt>
142       <dd>Allow <module>mod_proxy_balancer</module> to base loadbalancing decisions
143       on the number of active connections on the backend servers.</dd>
144
145       <dt><module>mod_sed</module></dt>
146       <dd>An advanced replacement of <module>mod_substitute</module>, allows
147       to edit the response body with the full power of sed.</dd>
148
149       <dt><module>mod_auth_form</module></dt>
150       <dd>Allows to do form-based authentication.</dd>
151
152       <dt><module>mod_session</module></dt>
153       <dd>Allows to keep session state for clients, using cookie or
154       database storage.</dd>
155
156     </dl>
157   </section>
158
159   <section id="module">
160     <title>Module Enhancements</title>
161     <dl>
162       <dt><module>mod_ssl</module></dt>
163
164       <dd><module>mod_ssl</module> can now be configured to use an
165       OCSP server to check the validation status of a client
166       certificate.  The default responder is configurable, along with
167       the decision on whether to prefer the responder designated in
168       the client certificate itself.</dd>
169
170       <dd><module>mod_ssl</module> now also supports OCSP stapling, where the
171       server pro-actively obtains an OCSP verification of its certificate and
172       transmits that to the client during the handshake. </dd>
173
174       <dd><module>mod_ssl</module> can now be configured to share SSL Session
175       data between servers through memcached</dd>
176
177       <dt><module>mod_proxy</module></dt>
178
179       <dd>The <directive module="mod_proxy">ProxyPass</directive> directive
180       is now most optimally configured within a
181       <directive module="core">Location</directive> or
182       <directive module="core">LocationMatch</directive>
183       block, and offers a significant performance advantage over the traditional
184       two-parameter syntax when present in large numbers.</dd>
185
186       <dt><module>mod_proxy_balancer</module></dt>
187
188       <dd>More runtime configuration changes for BalancerMembers via balancer-manager</dd>
189
190       <dd>Additional BalancerMembers can be added at runtime via balancer-manager</dd>
191
192       <dd>Runtime configuration of a subset of Balancer parameters</dd>
193
194       <dd>BalancerMembers can be set to 'Drain' so that they only respond to existing sticky
195       sessions, allowing them to be taken gracefully offline.</dd>
196
197       <dd>Balancer settings can be persistent after restarts.</dd>
198
199       <dt><module>mod_cache</module></dt>
200
201       <dd><module>mod_cache</module> can now cache HEAD requests.</dd>
202
203       <dd>Where possible, <module>mod_cache</module> directives can now be set
204       per directory, instead of per server.</dd>
205
206       <dd>The base URL of cached URLs can be customised, so that a cluster of
207       caches can share the same endpoint URL prefix.</dd>
208
209       <dd><module>mod_cache</module> is now capable of serving stale cached
210       data when a backend is unavailable (error 5xx).</dd>
211
212       <dd><module>mod_cache</module> can now insert HIT/MISS/REVALIDATE into
213       an X-Cache header.</dd>
214
215       <dt><module>mod_include</module></dt>
216       <dd>Support for the 'onerror' attribute within an 'include' element,
217       allowing an error document to be served on error instead of the default
218       error string.</dd>
219
220       <dt><module>mod_cgi</module>, <module>mod_include</module>,
221           <module>mod_isapi</module>, ...</dt>
222       <dd>Translation of headers to environment variables is more strict than
223       before to mitigate some possible cross-site-scripting attacks via header
224       injection. Headers containing invalid characters (including underscores)
225       are now silently dropped. <a href="env.html">Environment Variables
226       in Apache</a> has some pointers on how to work around broken legacy
227       clients which require such headers. (This affects all modules which
228       use these environment variables.)</dd>
229
230       <dt><module>mod_authz_core</module> Authorization Logic Containers</dt>
231
232       <dd>Advanced authorization logic may now be specified using the
233           <directive module="mod_authz_core">Require</directive> directive
234           and the related container directives, such as
235           <directive module="mod_authz_core"
236           type="section">RequireAll</directive>.</dd>
237
238       <dt><module>mod_info</module></dt>
239       <dd><module>mod_info</module> can now dump the pre-parsed configuration
240           to stdout during server startup.</dd>
241
242       <dt><module>mod_rewrite</module></dt>
243       <dd><module>mod_rewrite</module> adds the <code>[QSD]</code>
244           (Query String Discard) and <code>[END]</code> flags for
245           <directive module="mod_rewrite">RewriteRule</directive> to
246           simplify common rewriting scenarios.</dd>
247       <dd>Adds the possibility to use complex boolean expressions in <directive
248           module="mod_rewrite">RewriteCond</directive>.</dd>
249       <dd>Allows to use SQL queries as <directive
250           module="mod_rewrite">RewriteMap</directive> functions.</dd>
251
252       <dt><module>mod_ldap</module>, <module>mod_authnz_ldap</module></dt>
253       <dd><module>mod_authnz_ldap</module> adds support for nested groups.</dd>
254       <dd><module>mod_ldap</module> adds
255           <directive module="mod_ldap">LDAPConnectionPoolTTL</directive>,
256           <directive module="mod_ldap">LDAPTimeout</directive>, and
257           other improvements in the handling of timeouts.
258           This is especially useful for setups where a
259           stateful firewall drops idle connections to the LDAP server.</dd>
260       <dd><module>mod_ldap</module> adds
261           <directive module="mod_ldap">LDAPLibraryDebug</directive> to log
262           debug information provided by the used LDAP toolkit.</dd>
263
264     </dl>
265   </section>
266
267   <section id="programs">
268     <title>Program Enhancements</title>
269     <dl>
270         <dt>fcgistarter</dt>
271         <dd>FastCGI deamon starter utility</dd>
272         <dt>htcacheclean</dt>
273         <dd>Current cached URLs can now be listed, with optional metadata
274         included.</dd>
275         <dd>Allow explicit deletion of individual cached URLs from the
276         cache.</dd>
277         <dd>File sizes can now be rounded up to the given block size, making
278         the size limits map more closely to the real size on disk.</dd>
279         <dd>Cache size can now be limited by the number of inodes, instead
280         of or in addition to being limited by the size of the files on
281         disk.</dd>
282     </dl>
283   </section>
284
285   <section id="developer">
286     <title>Module Developer Changes</title>
287     <dl>
288       <dt>Check Configuration Hook Added</dt>
289
290       <dd>A new hook, <code>check_config</code>, has been added which runs
291           between the <code>pre_config</code> and <code>open_logs</code>
292           hooks.  It also runs before the <code>test_config</code> hook
293           when the <code>-t</code> option is passed to
294           <program>httpd</program>.  The <code>check_config</code> hook
295           allows modules to review interdependent configuration directive
296           values and adjust them while messages can still be logged to the
297           console.  The user can thus be alerted to misconfiguration problems
298           before the core <code>open_logs</code> hook function redirects
299           console output to the error log.</dd>
300
301       <dt>Expression Parser Added</dt>
302
303       <dd>We now have a general-purpose expression parser, whose API is
304           exposed in <var>ap_expr.h</var>.  This is adapted from the
305           expression parser previously implemented in
306           <module>mod_ssl</module>.</dd>
307
308       <dt>Authorization Logic Containers</dt>
309
310       <dd>Authorization modules now register as a provider, via
311       ap_register_auth_provider(), to support advanced authorization logic,
312       such as <directive module="mod_authz_core" type="section"
313       >RequireAll</directive>.</dd>
314
315       <dt>Small-Object Caching Interface</dt>
316
317       <dd>The <var>ap_socache.h</var> header exposes a provider-based
318       interface for caching small data objects, based on the previous
319       implementation of the <module>mod_ssl</module> session cache.
320       Providers using a shared-memory cyclic buffer, disk-based dbm
321       files, and a memcache distributed cache are currently
322       supported.</dd>
323
324       <dt>Cache Status Hook Added</dt>
325
326       <dd>The <module>mod_cache</module> module now includes a new
327       <code>cache_status</code> hook, which is called when the caching
328       decision becomes known. A default implementation is provided
329       which adds an optional <code>X-Cache</code> and
330       <code>X-Cache-Detail</code> header to the response.</dd>
331     </dl>
332
333     <p>The developer documentation contains a
334     <a href="developer/new_api_2_4.html">detailed list of API changes</a>.</p>
335   </section>
336
337 </manualpage>