]> granicus.if.org Git - apache/blob - docs/manual/new_features_2_4.xml
Documentation rebuild
[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>Run-time Loadable MPMs</dt>
38       <dd>Multiple MPMs can now be <a href="mpm.html#dynamic">built
39       as loadable modules</a> at compile time.
40       The MPM of choice can be configured at run time via <directive
41       module="mod_so">LoadModule</directive> directive.</dd>
42
43       <dt>Event MPM</dt>
44       <dd>The <a href="mod/event.html">Event MPM</a> is no longer experimental
45       but is now fully supported.</dd>
46
47       <dt>Asynchronous support</dt>
48       <dd>Better support for asynchronous read/write for supporting MPMs and
49       platforms.</dd>
50
51       <dt>Per-module and per-directory LogLevel configuration</dt>
52       <dd>The <directive module="core">LogLevel</directive> can now be
53       configured per module and per directory.  New levels <code>trace1</code>
54       to <code>trace8</code> have been added above the <code>debug</code> log
55       level.</dd>
56
57       <dt>Per-request configuration sections</dt>
58       <dd><directive module="core" type="section">If</directive>,
59           <directive module="core" type="section">ElseIf</directive>,
60           and <directive module="core" type="section">Else</directive>
61           sections can be used to set the configuration based on per-request
62           criteria.</dd>
63
64       <dt>General-purpose expression parser</dt>
65       <dd>A new expression parser allows to specify
66           <a href="expr.html">complex conditions</a> using a common syntax
67           in directives like
68           <directive module="mod_setenvif">SetEnvIfExpr</directive>,
69           <directive module="mod_rewrite">RewriteCond</directive>,
70           <directive module="mod_headers">Header</directive>,
71           <directive module="core" type="section">If</directive>,
72           and others.
73       </dd>
74
75       <dt>KeepAliveTimeout in milliseconds</dt>
76       <dd>It is now possible to specify <directive module="core"
77       >KeepAliveTimeout</directive> in milliseconds.
78       </dd>
79
80       <dt>NameVirtualHost directive</dt>
81       <dd>No longer needed and is now deprecated.</dd>
82
83       <dt>Override Configuration</dt>
84       <dd>The new <directive module="core">AllowOverrideList</directive>
85           directive allows more fine grained control which directives are
86           allowed in <code>.htaccess</code> files. </dd>
87
88       <dt>Config file variables</dt>
89       <dd>It is now possible to <directive module="core">Define</directive>
90           variables in the configuration, allowing a clearer representation
91           if the same value is used at many places in the configuration.
92       </dd>
93
94       <dt>Reduced memory usage</dt>
95       <dd>Despite many new features, 2.4.x tends to use less memory than
96       2.2.x.</dd>
97
98     </dl>
99   </section>
100
101   <section id="newmods">
102     <title>New Modules</title>
103     <dl>
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_proxy_express</module></dt>
111       <dd>Provides dynamically configured mass reverse proxies for
112       <module>mod_proxy</module></dd>
113
114       <dt><module>mod_remoteip</module></dt>
115       <dd>Replaces the apparent client remote IP address and hostname for the request
116       with the IP address list presented by a proxies or a load balancer via
117       the request headers.</dd>
118
119       <dt><module>mod_heartmonitor</module>,
120           <module>mod_lbmethod_heartbeat</module></dt>
121       <dd>Allow <module>mod_proxy_balancer</module> to base loadbalancing decisions
122       on the number of active connections on the backend servers.</dd>
123
124       <dt><module>mod_proxy_html</module></dt>
125       <dd>Formerly a third-party module, this supports fixing of HTML
126       links in a reverse proxy situation, where the backend generates
127       URLs that are not valid for the proxy's clients.</dd>
128
129       <dt><module>mod_sed</module></dt>
130       <dd>An advanced replacement of <module>mod_substitute</module>, allows
131       to edit the response body with the full power of sed.</dd>
132
133       <dt><module>mod_auth_form</module></dt>
134       <dd>Enables form-based authentication.</dd>
135
136       <dt><module>mod_session</module></dt>
137       <dd>Enables the use of session state for clients, using cookie or
138       database storage.</dd>
139
140       <dt><module>mod_allowmethods</module></dt>
141       <dd>New module to restrict certain HTTP methods without interfering with
142       authentication or authorization.</dd>
143
144       <dt><module>mod_lua</module></dt>
145       <dd>Embeds the <a href="http://www.lua.org/">Lua</a> language into httpd,
146       for configuration and small business logic functions. (Experimental)</dd>
147
148       <dt><module>mod_log_debug</module></dt>
149       <dd>Allows the addition of customizable debug logging at different phases of the
150       request processing.</dd>
151
152       <dt><module>mod_buffer</module></dt>
153       <dd>Provides for buffering the input and output filter stacks</dd>
154
155       <dt><module>mod_data</module></dt>
156       <dd>Convert response body into an RFC2397 data URL</dd>
157
158       <dt><module>mod_ratelimit</module></dt>
159       <dd>Provides Bandwidth Rate Limiting for Clients</dd>
160
161       <dt><module>mod_request</module></dt>
162       <dd>Provides Filters to handle and make available HTTP request bodies</dd>
163
164       <dt><module>mod_reflector</module></dt>
165       <dd>Provides Reflection of a request body as a response via the output filter stack.</dd>
166
167       <dt><module>mod_slotmem_shm</module></dt>
168       <dd>Provides a Slot-based shared memory provider (ala the scoreboard).</dd>
169
170       <dt><module>mod_xml2enc</module></dt>
171       <dd>Formerly a third-party module, this supports internationalisation
172       in libxml2-based (markup-aware) filter modules.</dd>
173
174       <dt><module>mod_macro</module> (available since 2.4.5)</dt>
175       <dd>Provide macros within configuration files.</dd>
176
177       <dt><module>mod_proxy_wstunnel</module> (available since 2.4.5)</dt>
178       <dd>Support web-socket tunnels.</dd>
179
180       <dt><module>mod_authnz_fcgi</module> (available since 2.4.10)</dt>
181       <dd>Enable FastCGI authorizer applications to authenticate and/or
182       authorize clients.</dd>
183
184       <dt><module>mod_http2</module> (available since 2.4.17)</dt>
185       <dd>Support for the HTTP/2 transport layer.</dd>
186
187       <dt><module>mod_proxy_hcheck</module> (available since 2.4.21)</dt>
188       <dd>Support independent dynamic health checks for remote proxiy backend servers.</dd>
189
190     </dl>
191   </section>
192
193   <section id="module">
194     <title>Module Enhancements</title>
195     <dl>
196       <dt><module>mod_ssl</module></dt>
197
198       <dd><module>mod_ssl</module> can now be configured to use an
199       OCSP server to check the validation status of a client
200       certificate.  The default responder is configurable, along with
201       the decision on whether to prefer the responder designated in
202       the client certificate itself.</dd>
203
204       <dd><module>mod_ssl</module> now also supports OCSP stapling, where the
205       server pro-actively obtains an OCSP verification of its certificate and
206       transmits that to the client during the handshake. </dd>
207
208       <dd><module>mod_ssl</module> can now be configured to share SSL Session
209       data between servers through memcached</dd>
210
211       <dd>EC keys are now supported in addition to RSA and DSA.</dd>
212
213       <dd>Support for TLS-SRP (available in 2.4.4 and later).</dd>
214
215       <dt><module>mod_proxy</module></dt>
216
217       <dd>The <directive module="mod_proxy">ProxyPass</directive> directive
218       is now most optimally configured within a
219       <directive module="core">Location</directive> or
220       <directive module="core">LocationMatch</directive>
221       block, and offers a significant performance advantage over the traditional
222       two-parameter syntax when present in large numbers.</dd>
223       <dd>The source address used for proxy requests is now configurable.</dd>
224       <dd>Support for Unix domain sockets to the backend (available in 2.4.7
225       and later).</dd>
226
227       <dt><module>mod_proxy_balancer</module></dt>
228
229       <dd>More runtime configuration changes for BalancerMembers via balancer-manager</dd>
230
231       <dd>Additional BalancerMembers can be added at runtime via balancer-manager</dd>
232
233       <dd>Runtime configuration of a subset of Balancer parameters</dd>
234
235       <dd>BalancerMembers can be set to 'Drain' so that they only respond to existing sticky
236       sessions, allowing them to be taken gracefully offline.</dd>
237
238       <dd>Balancer settings can be persistent after restarts.</dd>
239
240       <dt><module>mod_cache</module></dt>
241
242       <dd>The <module>mod_cache</module> CACHE filter can be optionally inserted
243       at a given point in the filter chain to provide fine control over caching.
244       </dd>
245
246       <dd><module>mod_cache</module> can now cache HEAD requests.</dd>
247
248       <dd>Where possible, <module>mod_cache</module> directives can now be set
249       per directory, instead of per server.</dd>
250
251       <dd>The base URL of cached URLs can be customised, so that a cluster of
252       caches can share the same endpoint URL prefix.</dd>
253
254       <dd><module>mod_cache</module> is now capable of serving stale cached
255       data when a backend is unavailable (error 5xx).</dd>
256
257       <dd><module>mod_cache</module> can now insert HIT/MISS/REVALIDATE into
258       an X-Cache header.</dd>
259
260       <dt><module>mod_include</module></dt>
261       <dd>Support for the 'onerror' attribute within an 'include' element,
262       allowing an error document to be served on error instead of the default
263       error string.</dd>
264
265       <dt><module>mod_cgi</module>, <module>mod_include</module>,
266           <module>mod_isapi</module>, ...</dt>
267       <dd>Translation of headers to environment variables is more strict than
268       before to mitigate some possible cross-site-scripting attacks via header
269       injection. Headers containing invalid characters (including underscores)
270       are now silently dropped. <a href="env.html">Environment Variables
271       in Apache</a> has some pointers on how to work around broken legacy
272       clients which require such headers. (This affects all modules which
273       use these environment variables.)</dd>
274
275       <dt><module>mod_authz_core</module> Authorization Logic Containers</dt>
276
277       <dd>Advanced authorization logic may now be specified using the
278           <directive module="mod_authz_core">Require</directive> directive
279           and the related container directives, such as
280           <directive module="mod_authz_core"
281           type="section">RequireAll</directive>.</dd>
282
283       <dt><module>mod_rewrite</module></dt>
284       <dd><module>mod_rewrite</module> adds the <code>[QSD]</code>
285           (Query String Discard) and <code>[END]</code> flags for
286           <directive module="mod_rewrite">RewriteRule</directive> to
287           simplify common rewriting scenarios.</dd>
288       <dd>Adds the possibility to use complex boolean expressions in <directive
289           module="mod_rewrite">RewriteCond</directive>.</dd>
290       <dd>Allows the use of SQL queries as <directive
291           module="mod_rewrite">RewriteMap</directive> functions.</dd>
292
293       <dt><module>mod_ldap</module>, <module>mod_authnz_ldap</module></dt>
294       <dd><module>mod_authnz_ldap</module> adds support for nested groups.</dd>
295       <dd><module>mod_ldap</module> adds
296           <directive module="mod_ldap">LDAPConnectionPoolTTL</directive>,
297           <directive module="mod_ldap">LDAPTimeout</directive>, and
298           other improvements in the handling of timeouts.
299           This is especially useful for setups where a
300           stateful firewall drops idle connections to the LDAP server.</dd>
301       <dd><module>mod_ldap</module> adds
302           <directive module="mod_ldap">LDAPLibraryDebug</directive> to log
303           debug information provided by the used LDAP toolkit.</dd>
304
305       <dt><module>mod_info</module></dt>
306       <dd><module>mod_info</module> can now dump the pre-parsed configuration
307           to stdout during server startup.</dd>
308
309       <dt><module>mod_auth_basic</module></dt>
310       <dd>New generic mechanism to fake basic authentication (available in
311       2.4.5 and later).</dd>
312
313     </dl>
314   </section>
315
316   <section id="programs">
317     <title>Program Enhancements</title>
318     <dl>
319         <dt><program>fcgistarter</program></dt>
320         <dd>New FastCGI daemon starter utility</dd>
321
322         <dt><program>htcacheclean</program></dt>
323         <dd>Current cached URLs can now be listed, with optional metadata
324         included.</dd>
325         <dd>Allow explicit deletion of individual cached URLs from the
326         cache.</dd>
327         <dd>File sizes can now be rounded up to the given block size, making
328         the size limits map more closely to the real size on disk.</dd>
329         <dd>Cache size can now be limited by the number of inodes, instead
330         of or in addition to being limited by the size of the files on
331         disk.</dd>
332
333         <dt><program>rotatelogs</program></dt>
334         <dd>May now create a link to the current log file.</dd>
335         <dd>May now invoke a custom post-rotate script.</dd>
336
337         <dt><program>htpasswd</program>, <program>htdbm</program></dt>
338         <dd>Support for the bcrypt algorithm (available in 2.4.4 and later).
339         </dd>
340     </dl>
341   </section>
342
343   <section id="documentation">
344     <title>Documentation</title>
345     <dl>
346         <dt>mod_rewrite</dt>
347         <dd>The <module>mod_rewrite</module> documentation has been
348         rearranged and almost completely rewritten, with a focus on
349         examples and common usage, as well as on showing you when other
350         solutions are more appropriate. The <a href="rewrite/">Rewrite
351         Guide</a> is now a top-level section with much more detail and
352         better organization.</dd>
353
354         <dt>mod_ssl</dt>
355         <dd>The <module>mod_ssl</module> documentation has been greatly
356         enhanced, with more examples at the getting started level, in
357         addition to the previous focus on technical details.</dd>
358
359         <dt>Caching Guide</dt>
360         <dd>The <a href="caching.html">Caching Guide</a> has been rewritten
361         to properly distinguish between the RFC2616 HTTP/1.1 caching
362         features provided by <module>mod_cache</module>, and the generic
363         key/value caching provided by the <a href="socache.html">socache</a>
364         interface, as well as to cover specialised caching provided by
365         mechanisms such as <module>mod_file_cache</module>.</dd>
366
367     </dl>
368   </section>
369
370   <section id="developer">
371     <title>Module Developer Changes</title>
372     <dl>
373       <dt>Check Configuration Hook Added</dt>
374
375       <dd>A new hook, <code>check_config</code>, has been added which runs
376           between the <code>pre_config</code> and <code>open_logs</code>
377           hooks.  It also runs before the <code>test_config</code> hook
378           when the <code>-t</code> option is passed to
379           <program>httpd</program>.  The <code>check_config</code> hook
380           allows modules to review interdependent configuration directive
381           values and adjust them while messages can still be logged to the
382           console.  The user can thus be alerted to misconfiguration problems
383           before the core <code>open_logs</code> hook function redirects
384           console output to the error log.</dd>
385
386       <dt>Expression Parser Added</dt>
387
388       <dd>We now have a general-purpose expression parser, whose API is
389           exposed in <var>ap_expr.h</var>.  This is adapted from the
390           expression parser previously implemented in
391           <module>mod_ssl</module>.</dd>
392
393       <dt>Authorization Logic Containers</dt>
394
395       <dd>Authorization modules now register as a provider, via
396       ap_register_auth_provider(), to support advanced authorization logic,
397       such as <directive module="mod_authz_core" type="section"
398       >RequireAll</directive>.</dd>
399
400       <dt>Small-Object Caching Interface</dt>
401
402       <dd>The <var>ap_socache.h</var> header exposes a provider-based
403       interface for caching small data objects, based on the previous
404       implementation of the <module>mod_ssl</module> session cache.
405       Providers using a shared-memory cyclic buffer, disk-based dbm
406       files, and a memcache distributed cache are currently
407       supported.</dd>
408
409       <dt>Cache Status Hook Added</dt>
410
411       <dd>The <module>mod_cache</module> module now includes a new
412       <code>cache_status</code> hook, which is called when the caching
413       decision becomes known. A default implementation is provided
414       which adds an optional <code>X-Cache</code> and
415       <code>X-Cache-Detail</code> header to the response.</dd>
416     </dl>
417
418     <p>The developer documentation contains a
419     <a href="developer/new_api_2_4.html">detailed list of API changes</a>.</p>
420   </section>
421
422 </manualpage>